How can i run the add on explorer/installer as root?

11 次查看(过去 30 天)
I need some more toolboxes but cant install them because the explorer does not have writing permission. I cant run Matlab on root because it crashes when i change the license user to root.

回答(1 个)

Simar
Simar 2024-3-6
编辑:Simar 2024-3-6
Hi,
I understand that you are facing difficulty dealing with permission issues when installing MATLAB toolboxes due to writing permissions. It is important to note that running MATLAB as root is not recommended due to potential security risks and the possibility of affecting system-wide configurations. Here are some workarounds to help installing additional MATLAB toolboxes without needing to run MATLAB as root:
1. Modify Permissions:
Temporarily change the permissions of the MATLAB installation directory to allow user to install the toolboxes. Do this from the terminal (assuming using Unix-like system) with commands like:
sudo chown -R your_username:your_group /path/to/matlab/directory
After changing the ownership, try installing the toolboxes again. Remember to revert the permissions back to their original state for security reasons once installed the necessary toolboxes.
2. Use install-addon Function:
MATLAB provides a programmatic way to install add-ons, including toolboxes, using the matlab.addons.install function. This might bypass the need for GUI-based installation and potentially avoid the permission issues. One would need the file path of the toolbox file. For example:
matlab.addons.install('path_to_toolbox_file.mltbx');
3. Install Toolboxes Manually:
Go through add-ons on MATLAB and search for toolbox to install. Try manually extracting them to appropriate directory. This method is more hands-on and requires careful attention to ensure that MATLAB recognizes the manually installed toolboxes.
If issue persists, try reaching out to MATLAB Support.
Please refer to the following links:
Hope it helps!
Best Regards,
Simar

类别

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

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by