Effacer les filtres
Effacer les filtres

mex access denied error 206

5 vues (au cours des 30 derniers jours)
Guillaume Raigné
Guillaume Raigné le 27 Nov 2013
Commenté : Wen Wu le 13 Juil 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

Réponses (2)

Friedrich
Friedrich le 28 Nov 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 commentaires
Guillaume Raigné
Guillaume Raigné le 29 Nov 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 le 29 Nov 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?

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 27 Nov 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 commentaires
Guillaume Raigné
Guillaume Raigné le 29 Nov 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 le 13 Juil 2021
Copy the file to another folder, not the Matlab default folder.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by