mex access denied error 206

5 次查看(过去 30 天)
Guillaume Raigné
Guillaume Raigné 2013-11-27
评论: Wen Wu 2021-7-13
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

回答(2 个)

Friedrich
Friedrich 2013-11-28
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 个评论
Guillaume Raigné
Guillaume Raigné 2013-11-29
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 2013-11-29
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?

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2013-11-27
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 个评论
Guillaume Raigné
Guillaume Raigné 2013-11-29
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 2021-7-13
Copy the file to another folder, not the Matlab default folder.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by