Why am I getting an error stating 'This folder name is invalid. The destination cannot be named private' when installing MATLAB or other MathWorks products??

46 views (last 30 days)
When installing MATLAB (or when installing a support package in the Add-Ons explorer), why do I get an error saying "This folder name is invalid. Folder names can contain alphanumeric characters and '-', '_', '.', or '/' only. The destination folder cannot be named "private"?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Mar 2023
Edited: MathWorks Support Team on 15 Mar 2023
If MATLAB is installed:
This error may occur on macOS when installing a Support Package using the Add-Ons explorer if there is a space or other special character in the file path to the Support Package install directory.
Enter the following command in the MATLAB Command Window to output the full path to your Support Package install directory:
matlabshared.supportpkg.getSupportPackageRoot
If the file path has any spaces or special characters in it, please remove any spaces or special characters from the file path then close and re-open MATLAB and try to install the Support Package again.
If you can't modify the existing file path, you can point MATLAB to a different directory to install the Support Package in instead. You must have write permissions in the folder, and the file path to the folder must not contain any spaces or special characters. To do so, run the following command:
matlabshared.supportpkg.setSupportPackageRoot(<path to new Support Package install directory>)
Then close and re-open MATLAB and try to install the Support Package again.
If you cannot relocate or rename the appropriate file(s) or folder(s), then you may be able to circumvent this issue by creating a symbolic link to a different file or folder that is accepted by MATLAB. To do this, follow the steps below:
  1. Open the application Terminal. You can find it in the Spotlight Search or Launchpad on macOS.
  2. Type in "ln -s [original-file/folder] [new-file/folder]"
    1. [original file/folder] is the current file or folder name that is unaccepted by MATLAB
    2. [new-file/folder] is the new file or folder with a name that MATLAB will accept (so no special characters or spaces)
    3. Make sure you put quotation marks around any names in the filepath that have spaces.
If MATLAB is not installed:
Please try starting the installer with a different tmp directory. Depending on which release of MATLAB you're using, there different ways of doing this. Please review the article below to accomplish this.
How can I change the temp directory the MATLAB installer uses?

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2014a

Community Treasure Hunt

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

Start Hunting!