Borrar filtros
Borrar filtros

mex access denied error 206

5 visualizaciones (últimos 30 días)
Guillaume Raigné
Guillaume Raigné el 27 de Nov. de 2013
Comentada: Wen Wu el 13 de Jul. de 2021
Hi
My configuration is : R2012b and Windows 7 (64 bits) I get the following error when I try to configure compiler options with "mex-setup" :
>> AccŠs refus‚. access denied
>> Error using mex (line 206)
>> Unable to complete successfully.
I have read/write permission on the Matlab installation folder but not everywhere. --> I can't execute Matlab with administrator rigths.
My question is : which folder mex need to access ? Thanks

Respuestas (2)

Friedrich
Friedrich el 28 de Nov. de 2013
Hi,
maybe try to run:
dbstop if caught error
before running mex -setup. In that way you will stop in the line which raises the error and this should help to determine what MATLAB is trying to do/access.
  2 comentarios
Guillaume Raigné
Guillaume Raigné el 29 de Nov. de 2013
Thank you for your answer
Exception comes from mex_helper.m (line 64) when matlab tries do to :
errCode = runCmdInShell(cmdtool, cmdargs);
with :
cmdtool = '"C:\Program Files\MATLAB\R2012b\sys\perl\win32\bin\perl.exe" "C:\Program Files\MATLAB\R2012b\bin\mex.pl"'
cmdargs = '-called_from_matlab -matlab "C:\Program Files\MATLAB\R2012b" -setup'
My problem now is that I don't know what perl.exe is trying to access.
Friedrich
Friedrich el 29 de Nov. de 2013
Hi,
the mex.pl pearl file tries to acccess the registry and some local folders in order to check for installed compilers. Which those are depends on the compiler for which is checked. In the \bin\win64\mexopts folder of your MATLAB installion are .stp files located. Those are used to determine if a certain compiler is installed. And in those files you see the access to the registry/files/environment variables. MATLAB is running all those stp files to check for a supported compiler which can be a bit of work to get all folders/registry entries which are checked. Easier to figure that out might a process monitor log, where you should see which access is denied.
Maybe also consider running mex -setup and do NOT let MATLAB check for compilers. Select N in the first question and select manually the compiler you have installed. Does that work better?

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 27 de Nov. de 2013
This can happen if you are trying to run from within the /Program Files/ directory. You need to run from a directory such as your Documents And Files directory.
In Windows 7, the operating system itself blocks write access to /Program Files/ even if an administrator specifically gives you write access to the directory.
  2 comentarios
Guillaume Raigné
Guillaume Raigné el 29 de Nov. de 2013
Thank you for your answer.
My MATLAB current folder is not within the /Program Files/ directory. Is that what you meant by "run from" ?
Wen Wu
Wen Wu el 13 de Jul. de 2021
Copy the file to another folder, not the Matlab default folder.

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by