Can't install any toolboxes because can't write to /usr/local/MATLAB/R2017

I have not been able to install any toolboxes because the installation runs into PermissionDenieds on /usr/local/MATLAB/R2017/. I've included a logfile /tmp/mathworks_pjhellemn.log below which includes the error. I tried running Matlab with sudo, but my license is only for user pjhellemn and not for root, so Matlab would exit with a License Manager Error -9. I also ran "sudo chmod -R 777 *" at /usr/local/MATLAB/ before trying to install the toolbox, but then ended up getting "java.io.IOException: Error 1 setting permissions for /usr/local/MATLAB/R2017a/toolbox/local/pathdef.m. Operation not permitted" (also in the logfile below, but nearer to the bottom).
I am running Ubuntu 16.04. I'm using R2017 and trying to install the Bioinformatics toolbox right now, but I've had this same issue with R2016 and the Statistics and Machine Learning Toolbox. I am installing Matlab by downloading the zip, extracting it, and then running "sudo ./install" in the proper directory, and using all defaults in the installation.
Since trying "chmod 777" I have deleted the Matlab installation directory ("sudo rm -rf /usr/local/MATLAB/") and freshly installed, but am running into the same problems.
How do I get around these permission / licensing errors?
Log file:
(Apr 10, 2017 21:04:42) ##################################################################
(Apr 10, 2017 21:04:42) #
(Apr 10, 2017 21:04:42) # Today's Date:
(Apr 10, 2017 21:04:42) Mon Apr 10 21:04:42 CDT 2017
(Apr 10, 2017 21:04:42)
(Apr 10, 2017 21:04:42) System Info
(Apr 10, 2017 21:04:42) OS: Linux 4.4.0-72-generic
(Apr 10, 2017 21:04:42) Arch: amd64
(Apr 10, 2017 21:04:42) Data Model: 64
(Apr 10, 2017 21:04:42) Language: en
(Apr 10, 2017 21:04:42) Java Vendor: Oracle Corporation
(Apr 10, 2017 21:04:42) Java Home: /usr/local/MATLAB/R2017a/sys/java/jre/glnxa64/jre
(Apr 10, 2017 21:04:42) Java Version: 1.7.0_60
(Apr 10, 2017 21:04:42) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Apr 10, 2017 21:04:42) Java Class Path: Skipped
(Apr 10, 2017 21:04:42) User Name: pjhellemn
(Apr 10, 2017 21:04:42) Current Directory: /usr/local/MATLAB/R2017a/bin
(Apr 10, 2017 21:04:42) Total upgradeable support packages found = 0
(Apr 11, 2017 04:26:37) ##################################################################
(Apr 11, 2017 04:26:37) #
(Apr 11, 2017 04:26:37) # Today's Date:
(Apr 11, 2017 04:26:37) Tue Apr 11 04:26:37 CDT 2017
(Apr 11, 2017 04:26:37)
(Apr 11, 2017 04:26:37) System Info
(Apr 11, 2017 04:26:37) OS: Linux 4.4.0-72-generic
(Apr 11, 2017 04:26:37) Arch: amd64
(Apr 11, 2017 04:26:37) Data Model: 64
(Apr 11, 2017 04:26:37) Language: en
(Apr 11, 2017 04:26:37) Java Vendor: Oracle Corporation
(Apr 11, 2017 04:26:37) Java Home: /usr/local/MATLAB/R2017a/sys/java/jre/glnxa64/jre
(Apr 11, 2017 04:26:37) Java Version: 1.7.0_60
(Apr 11, 2017 04:26:37) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Apr 11, 2017 04:26:37) Java Class Path: /usr/local/MATLAB/R2017a/java/config/trialsinstaller/pathlist.jar
(Apr 11, 2017 04:26:37) User Name: pjhellemn
(Apr 11, 2017 04:26:37) Current Directory: /home/pjhellemn/pjh5/stat450/MLSiml/jimmy/demo_GMKL
(Apr 11, 2017 04:26:37) Input arguments:
(Apr 11, 2017 04:26:37) root /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:26:37) libdir /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:26:37) matlabargs "-r "matlab.internal.addons.cdAndShowAddon('BI')""
(Apr 11, 2017 04:26:37) addonMode trialMode
(Apr 11, 2017 04:26:37) entitlementId 3284817
(Apr 11, 2017 04:26:37) Argument not logged
(Apr 11, 2017 04:26:37) basecode.BI true
(Apr 11, 2017 04:26:37) standalone true
(Apr 11, 2017 04:26:38) Starting local product/component search in download directory
(Apr 11, 2017 04:26:38) Searching for archives...
(Apr 11, 2017 04:26:38) /home/pjhellemn/Downloads/MathWorks/R2017a/archives doesn't exist ... skipping.
(Apr 11, 2017 04:26:39) Archive search complete. 0 total files found.
(Apr 11, 2017 04:26:39) Completed local product/component search
(Apr 11, 2017 04:26:41) Contacting MathWorks
*(Apr 11, 2017 04:26:47) Error: Unable to write to
/usr/local/MATLAB/R2017a.*
Select a different folder.
(Apr 11, 2017 04:26:54) The installation is not complete. If you quit now, you will need to restart the installation from the beginning.
Do you really want to quit now?
(Apr 11, 2017 04:26:57) Exiting with status -1
(Apr 11, 2017 04:26:58) End - Unsuccessful.
(Apr 11, 2017 04:28:37) ##################################################################
(Apr 11, 2017 04:28:37) #
(Apr 11, 2017 04:28:37) # Today's Date:
(Apr 11, 2017 04:28:37) Tue Apr 11 04:28:37 CDT 2017
(Apr 11, 2017 04:28:37)
(Apr 11, 2017 04:28:37) System Info
(Apr 11, 2017 04:28:37) OS: Linux 4.4.0-72-generic
(Apr 11, 2017 04:28:37) Arch: amd64
(Apr 11, 2017 04:28:37) Data Model: 64
(Apr 11, 2017 04:28:37) Language: en
(Apr 11, 2017 04:28:37) Java Vendor: Oracle Corporation
(Apr 11, 2017 04:28:37) Java Home: /usr/local/MATLAB/R2017a/sys/java/jre/glnxa64/jre
(Apr 11, 2017 04:28:37) Java Version: 1.7.0_60
(Apr 11, 2017 04:28:37) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Apr 11, 2017 04:28:37) Java Class Path: /usr/local/MATLAB/R2017a/java/config/trialsinstaller/pathlist.jar
(Apr 11, 2017 04:28:37) User Name: pjhellemn
(Apr 11, 2017 04:28:37) Current Directory: /home/pjhellemn/pjh5/stat450/MLSiml/jimmy/demo_GMKL
(Apr 11, 2017 04:28:37) Input arguments:
(Apr 11, 2017 04:28:37) root /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:28:37) libdir /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:28:37) matlabargs "-r "matlab.internal.addons.cdAndShowAddon('BI')""
(Apr 11, 2017 04:28:37) addonMode trialMode
(Apr 11, 2017 04:28:37) entitlementId 3284817
(Apr 11, 2017 04:28:37) Argument not logged
(Apr 11, 2017 04:28:37) basecode.BI true
(Apr 11, 2017 04:28:37) standalone true
(Apr 11, 2017 04:28:38) Starting local product/component search in download directory
(Apr 11, 2017 04:28:38) Searching for archives...
(Apr 11, 2017 04:28:38) /home/pjhellemn/Downloads/MathWorks/R2017a/archives doesn't exist ... skipping.
(Apr 11, 2017 04:28:38) Archive search complete. 0 total files found.
(Apr 11, 2017 04:28:38) Completed local product/component search
(Apr 11, 2017 04:28:41) Contacting MathWorks
(Apr 11, 2017 04:28:46) Error: Unable to write to
/usr/local/MATLAB/R2017a.
Select a different folder.
(Apr 11, 2017 04:29:55) Error: Unable to write to
/usr/local/MATLAB/R2017a.
Select a different folder.
(Apr 11, 2017 04:30:19) Retrieving license data
(Apr 11, 2017 04:30:21) Retrieving product data
(Apr 11, 2017 04:30:23) Verifying account information
(Apr 11, 2017 04:30:26) Completed local product/component search
(Apr 11, 2017 04:30:34) Confirmation Text:
Requested Products:
Bioinformatics Toolbox 4.8
Required Products:
MATLAB 9.2
Statistics and Machine Learning Toolbox 11.1
Required products are automatically included in your trial.
Installation folder:
/usr/local/MATLAB/R2017a
Download Size: 526 MB
Installation Size: 1,301 MB
(Apr 11, 2017 04:30:39) Starting Download: Bioinformatics Toolbox 4.8 : 179,886,072 bytes
(Apr 11, 2017 04:31:17) Starting Download: Statistics and Machine Learning Toolbox 11.1 : 372,455,664 bytes
(Apr 11, 2017 04:32:33) Installing Product: Bioinformatics Toolbox 4.8
*(Apr 11, 2017 04:32:33) java.io.FileNotFoundException: /usr/local/MATLAB/R2017a/bin/glnxa64/libAffymetrixSDK.so (Permission denied)*
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at com.mathworks.instutil.FileIO.copyToFileFromStream(FileIO.java:491)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:166)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:157)
at com.mathworks.install.archive.zip.commonscompress.ArchiveEntryExtractorImpl.extract(ArchiveEntryExtractorImpl.java:37)
at com.mathworks.install.archive.zip.commonscompress.CopyInputStreamToTempZipFileExtractor.extractEntry(CopyInputStreamToTempZipFileExtractor.java:79)
at com.mathworks.install.archive.zip.commonscompress.CopyInputStreamToTempZipFileExtractor.extract(CopyInputStreamToTempZipFileExtractor.java:46)
at com.mathworks.install.archive.DecodeArchiveInputStreamExtractor.extract(DecodeArchiveInputStreamExtractor.java:34)
at com.mathworks.install.input.ArchiveComponentSource.extract(ArchiveComponentSource.java:26)
at com.mathworks.install.InstallableComponentImpl.install(InstallableComponentImpl.java:102)
at com.mathworks.install.ComponentInstallerImpl.installComponent(ComponentInstallerImpl.java:99)
at com.mathworks.install.ComponentInstallerImpl.installComponents(ComponentInstallerImpl.java:58)
at com.mathworks.install.ProductInstallerImpl.installComponents(ProductInstallerImpl.java:225)
at com.mathworks.install.ProductInstallerImpl.installProduct(ProductInstallerImpl.java:211)
at com.mathworks.install.ProductInstallerImpl.installProducts(ProductInstallerImpl.java:88)
at com.mathworks.install.InstallerImpl.install(InstallerImpl.java:113)
at com.mathworks.installwizard.model.InstallTask.execute(InstallTask.java:46)
at com.mathworks.installwizard.model.AbstractBackgroundTask.execute(AbstractBackgroundTask.java:38)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:74)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:24)
at com.mathworks.wizard.worker.WorkerImpl.doInBackground(WorkerImpl.java:24)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
(Apr 11, 2017 04:32:33) The following error was detected while installing 3p/affymetrixsdk_glnxa64:
*/usr/local/MATLAB/R2017a/bin/glnxa64/libAffymetrixSDK.so (Permission denied)*
Would you like to retry installing 3p/affymetrixsdk_glnxa64? If you press No, the installer will exit without completing the installation. More information can be found at /tmp/mathworks_pjhellemn.log
(Apr 11, 2017 04:38:25) Installing Product: Statistics and Machine Learning Toolbox 11.1
*(Apr 11, 2017 04:38:47) java.io.FileNotFoundException: /usr/local/MATLAB/R2017a/toolbox/local/pathdef.m (Permission denied)*
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at com.mathworks.instutil.FileIO.copyToFileFromStream(FileIO.java:491)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:166)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:157)
at com.mathworks.install.command.PathdefGeneratorCommand.writePathdefFile(PathdefGeneratorCommand.java:285)
at com.mathworks.install.command.PathdefGeneratorCommand.generatePathdef(PathdefGeneratorCommand.java:93)
at com.mathworks.install.command.PathdefGeneratorCommand.execute(PathdefGeneratorCommand.java:59)
at com.mathworks.matlabinstaller.AbstractMatlabInstallConfiguration$3.execute(AbstractMatlabInstallConfiguration.java:489)
at com.mathworks.install.InstallModule$1.installProducts(InstallModule.java:202)
at com.mathworks.install.InstallerImpl.install(InstallerImpl.java:113)
at com.mathworks.installwizard.model.InstallTask.execute(InstallTask.java:46)
at com.mathworks.installwizard.model.AbstractBackgroundTask.execute(AbstractBackgroundTask.java:38)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:74)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:24)
at com.mathworks.wizard.worker.WorkerImpl.doInBackground(WorkerImpl.java:24)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
(Apr 11, 2017 04:38:47) Error: The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s). More information can be found at /tmp/mathworks_pjhellemn.log
(Apr 11, 2017 04:40:26) Exiting with status -1
(Apr 11, 2017 04:40:27) End - Unsuccessful.
(Apr 11, 2017 04:42:03) ##################################################################
(Apr 11, 2017 04:42:03) #
(Apr 11, 2017 04:42:03) # Today's Date:
(Apr 11, 2017 04:42:03) Tue Apr 11 04:42:03 CDT 2017
(Apr 11, 2017 04:42:03)
(Apr 11, 2017 04:42:03) System Info
(Apr 11, 2017 04:42:03) OS: Linux 4.4.0-72-generic
(Apr 11, 2017 04:42:03) Arch: amd64
(Apr 11, 2017 04:42:03) Data Model: 64
(Apr 11, 2017 04:42:03) Language: en
(Apr 11, 2017 04:42:03) Java Vendor: Oracle Corporation
(Apr 11, 2017 04:42:03) Java Home: /usr/local/MATLAB/R2017a/sys/java/jre/glnxa64/jre
(Apr 11, 2017 04:42:03) Java Version: 1.7.0_60
(Apr 11, 2017 04:42:03) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Apr 11, 2017 04:42:03) Java Class Path: /usr/local/MATLAB/R2017a/java/config/trialsinstaller/pathlist.jar
(Apr 11, 2017 04:42:03) User Name: pjhellemn
(Apr 11, 2017 04:42:03) Current Directory: /home/pjhellemn/pjh5/stat450/MLSiml/jimmy/demo_GMKL
(Apr 11, 2017 04:42:03) Input arguments:
(Apr 11, 2017 04:42:03) root /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:42:03) libdir /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:42:03) matlabargs "-r "matlab.internal.addons.cdAndShowAddon('BI')""
(Apr 11, 2017 04:42:03) addonMode trialMode
(Apr 11, 2017 04:42:03) entitlementId 3284817
(Apr 11, 2017 04:42:03) Argument not logged
(Apr 11, 2017 04:42:03) basecode.BI true
(Apr 11, 2017 04:42:03) standalone true
(Apr 11, 2017 04:42:04) Starting local product/component search in download directory
(Apr 11, 2017 04:42:04) Searching for archives...
(Apr 11, 2017 04:42:04) Reading /home/pjhellemn/Downloads/MathWorks/R2017a/archives
(Apr 11, 2017 04:42:04) 84 files found in /home/pjhellemn/Downloads/MathWorks/R2017a/archives
(Apr 11, 2017 04:42:04) Archive search complete. 84 total files found.
(Apr 11, 2017 04:42:04) Completed local product/component search
(Apr 11, 2017 04:42:08) Contacting MathWorks
(Apr 11, 2017 04:42:18) Retrieving license data
(Apr 11, 2017 04:42:19) Assembling product list...
(Apr 11, 2017 04:42:19) Retrieving product data
(Apr 11, 2017 04:42:20) Verifying account information
(Apr 11, 2017 04:42:26) Completed local product/component search
(Apr 11, 2017 04:42:29) Confirmation Text:
Requested Products:
Bioinformatics Toolbox 4.8
Required Products:
MATLAB 9.2
Statistics and Machine Learning Toolbox 11.1
Required products are automatically included in your trial.
Installation folder:
/usr/local/MATLAB/R2017a
Installation Size: 774 MB
(Apr 11, 2017 04:42:32) Installing Product: Bioinformatics Toolbox 4.8
(Apr 11, 2017 04:42:42) Installing Product: Statistics and Machine Learning Toolbox 11.1
*(Apr 11, 2017 04:42:59) java.io.FileNotFoundException: /usr/local/MATLAB/R2017a/toolbox/local/pathdef.m (Permission denied)*
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at com.mathworks.instutil.FileIO.copyToFileFromStream(FileIO.java:491)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:166)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:157)
at com.mathworks.install.command.PathdefGeneratorCommand.writePathdefFile(PathdefGeneratorCommand.java:285)
at com.mathworks.install.command.PathdefGeneratorCommand.generatePathdef(PathdefGeneratorCommand.java:93)
at com.mathworks.install.command.PathdefGeneratorCommand.execute(PathdefGeneratorCommand.java:59)
at com.mathworks.matlabinstaller.AbstractMatlabInstallConfiguration$3.execute(AbstractMatlabInstallConfiguration.java:489)
at com.mathworks.install.InstallModule$1.installProducts(InstallModule.java:202)
at com.mathworks.install.InstallerImpl.install(InstallerImpl.java:113)
at com.mathworks.installwizard.model.InstallTask.execute(InstallTask.java:46)
at com.mathworks.installwizard.model.AbstractBackgroundTask.execute(AbstractBackgroundTask.java:38)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:74)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:24)
at com.mathworks.wizard.worker.WorkerImpl.doInBackground(WorkerImpl.java:24)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
(Apr 11, 2017 04:42:59) Error: The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s). More information can be found at /tmp/mathworks_pjhellemn.log
(Apr 11, 2017 04:45:03) Exiting with status -1
(Apr 11, 2017 04:45:04) End - Unsuccessful.
(Apr 11, 2017 04:46:50) ##################################################################
(Apr 11, 2017 04:46:50) #
(Apr 11, 2017 04:46:50) # Today's Date:
(Apr 11, 2017 04:46:50) Tue Apr 11 04:46:50 CDT 2017
(Apr 11, 2017 04:46:50)
(Apr 11, 2017 04:46:50) System Info
(Apr 11, 2017 04:46:50) OS: Linux 4.4.0-72-generic
(Apr 11, 2017 04:46:50) Arch: amd64
(Apr 11, 2017 04:46:50) Data Model: 64
(Apr 11, 2017 04:46:50) Language: en
(Apr 11, 2017 04:46:50) Java Vendor: Oracle Corporation
(Apr 11, 2017 04:46:50) Java Home: /usr/local/MATLAB/R2017a/sys/java/jre/glnxa64/jre
(Apr 11, 2017 04:46:50) Java Version: 1.7.0_60
(Apr 11, 2017 04:46:50) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Apr 11, 2017 04:46:50) Java Class Path: /usr/local/MATLAB/R2017a/java/config/trialsinstaller/pathlist.jar
(Apr 11, 2017 04:46:50) User Name: pjhellemn
(Apr 11, 2017 04:46:50) Current Directory: /home/pjhellemn/pjh5/stat450/MLSiml/jimmy/demo_GMKL
(Apr 11, 2017 04:46:50) Input arguments:
(Apr 11, 2017 04:46:50) root /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:46:50) libdir /usr/local/MATLAB/R2017a
(Apr 11, 2017 04:46:50) matlabargs "-r "matlab.internal.addons.cdAndShowAddon('BI')""
(Apr 11, 2017 04:46:50) addonMode trialMode
(Apr 11, 2017 04:46:50) entitlementId 3284817
(Apr 11, 2017 04:46:50) Argument not logged
(Apr 11, 2017 04:46:50) basecode.BI true
(Apr 11, 2017 04:46:50) standalone true
(Apr 11, 2017 04:46:51) Starting local product/component search in download directory
(Apr 11, 2017 04:46:51) Searching for archives...
(Apr 11, 2017 04:46:51) Reading /home/pjhellemn/Downloads/MathWorks/R2017a/archives
(Apr 11, 2017 04:46:51) 84 files found in /home/pjhellemn/Downloads/MathWorks/R2017a/archives
(Apr 11, 2017 04:46:51) Archive search complete. 84 total files found.
(Apr 11, 2017 04:46:51) Completed local product/component search
(Apr 11, 2017 04:46:53) Contacting MathWorks
(Apr 11, 2017 04:47:01) Retrieving license data
(Apr 11, 2017 04:47:02) Retrieving product data
(Apr 11, 2017 04:47:03) Verifying account information
(Apr 11, 2017 04:47:05) Completed local product/component search
(Apr 11, 2017 04:47:08) Confirmation Text:
Requested Products:
Bioinformatics Toolbox 4.8
Required Products:
MATLAB 9.2
Statistics and Machine Learning Toolbox 11.1
Required products are automatically included in your trial.
Installation folder:
/usr/local/MATLAB/R2017a
Installation Size: 774 MB
(Apr 11, 2017 04:47:14) Installing Product: Bioinformatics Toolbox 4.8
(Apr 11, 2017 04:47:21) Installing Product: Statistics and Machine Learning Toolbox 11.1
*(Apr 11, 2017 04:47:36) java.io.IOException: Error 1 setting permissions for /usr/local/MATLAB/R2017a/toolbox/local/pathdef.m. Operation not permitted*
at com.mathworks.instutil.FilePermissionsUtil.setUnixFilePerms(Native Method)
at com.mathworks.instutil.FilePermissionsUtil.setFilePermissions(FilePermissionsUtil.java:263)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:168)
at com.mathworks.instutil.FileIO.createFileFromStream(FileIO.java:157)
at com.mathworks.install.command.PathdefGeneratorCommand.writePathdefFile(PathdefGeneratorCommand.java:285)
at com.mathworks.install.command.PathdefGeneratorCommand.generatePathdef(PathdefGeneratorCommand.java:93)
at com.mathworks.install.command.PathdefGeneratorCommand.execute(PathdefGeneratorCommand.java:59)
at com.mathworks.matlabinstaller.AbstractMatlabInstallConfiguration$3.execute(AbstractMatlabInstallConfiguration.java:489)
at com.mathworks.install.InstallModule$1.installProducts(InstallModule.java:202)
at com.mathworks.install.InstallerImpl.install(InstallerImpl.java:113)
at com.mathworks.installwizard.model.InstallTask.execute(InstallTask.java:46)
at com.mathworks.installwizard.model.AbstractBackgroundTask.execute(AbstractBackgroundTask.java:38)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:74)
at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:24)
at com.mathworks.wizard.worker.WorkerImpl.doInBackground(WorkerImpl.java:24)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
(Apr 11, 2017 04:47:36) Error: The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s). More information can be found at /tmp/mathworks_pjhellemn.log
(Apr 11, 2017 04:48:24) Exiting with status -1
(Apr 11, 2017 04:48:25) End - Unsuccessful.
(Apr 11, 2017 12:32:00) ##################################################################
(Apr 11, 2017 12:32:00) #
(Apr 11, 2017 12:32:00) # Today's Date:
(Apr 11, 2017 12:32:00) Tue Apr 11 12:32:00 CDT 2017
(Apr 11, 2017 12:32:00)
(Apr 11, 2017 12:32:00) System Info
(Apr 11, 2017 12:32:00) OS: Linux 4.4.0-72-generic
(Apr 11, 2017 12:32:00) Arch: amd64
(Apr 11, 2017 12:32:00) Data Model: 64
(Apr 11, 2017 12:32:00) Language: en
(Apr 11, 2017 12:32:00) Java Vendor: Oracle Corporation
(Apr 11, 2017 12:32:00) Java Home: /usr/local/MATLAB/R2017a/sys/java/jre/glnxa64/jre
(Apr 11, 2017 12:32:00) Java Version: 1.7.0_60
(Apr 11, 2017 12:32:00) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Apr 11, 2017 12:32:00) Java Class Path: /usr/local/MATLAB/R2017a/java/config/trialsinstaller/pathlist.jar
(Apr 11, 2017 12:32:00) User Name: pjhellemn
(Apr 11, 2017 12:32:00) Current Directory: /home/pjhellemn/pjh5/stat450/MLSiml/jimmy/demo_GMKL
(Apr 11, 2017 12:32:00) Input arguments:
(Apr 11, 2017 12:32:00) root /usr/local/MATLAB/R2017a
(Apr 11, 2017 12:32:00) libdir /usr/local/MATLAB/R2017a
(Apr 11, 2017 12:32:00) matlabargs "-r "matlab.internal.addons.cdAndShowAddon('BI')""
(Apr 11, 2017 12:32:00) addonMode trialMode
(Apr 11, 2017 12:32:00) entitlementId 3284817
(Apr 11, 2017 12:32:00) Argument not logged
(Apr 11, 2017 12:32:00) basecode.BI true
(Apr 11, 2017 12:32:00) standalone true
(Apr 11, 2017 12:32:01) Starting local product/component search in download directory
(Apr 11, 2017 12:32:01) Searching for archives...
(Apr 11, 2017 12:32:01) /home/pjhellemn/Downloads/MathWorks/R2017a/archives doesn't exist ... skipping.
(Apr 11, 2017 12:32:01) Archive search complete. 0 total files found.
(Apr 11, 2017 12:32:01) Completed local product/component search
(Apr 11, 2017 12:32:03) Contacting MathWorks
(Apr 11, 2017 12:32:08) Error: Unable to write to
/usr/local/MATLAB/R2017a.
Select a different folder.
(Apr 11, 2017 12:32:15) The installation is not complete. If you quit now, you will need to restart the installation from the beginning.
Do you really want to quit now?
(Apr 11, 2017 12:32:16) Exiting with status -1
(Apr 11, 2017 12:32:17) End - Unsuccessful.

Answers (9)

/path/to/installation/directory is the path to your matlab installation if you type matlabroot the matlab terminal it will tell you e.g
sudo chown -R $LOGNAME: /usr/local/MATLAB/R2017b
change the path accordingly to matlabroot's output
Thats it

56 Comments

Thank you! Just doing this solved my issue completely.
Thank you very much. It helps me a lot.
Thank You, solved all the problems I was having
Thanks! For me in ubuntu 16.04, it worked without the colon inbetween logname and /usr
sudo chown -R $LOGNAME /usr/local/MATLAB/R2019a
problem solved, bionic r2019b. Thank you.
Worked with 2018b!Thank you very much!!!!!!
Thaaanks! Also worked for MacOS (R2019b)
how can i do this on windows 10 can someone please help?
Worked on Ubuntu 20.04 with Matlab R2020b!
Thanks a lot
It works also for me on ubuntu 20.04 with Matlab 2020b.
Thanks a lot.
Worked on Ubuntu 20.10 with version 2020b! Thanks so much.
For me work this: sudo chmod -R o+rw /usr/local/MATLAB/R2020b
Ubuntu 20.04.2 LTS
This worked for me!
I'm using Ubuntu 18.04 and Matlab R2020b.
Thanks!
Also for me, i'm using Ubuntu 20.04 and Matlab R2021a
it solved my probelm, my version is R2019a
It solved my problem too, my version is R2021a
Thank you so much, it worked for me too
great! worked for matlab 2021b on ubuntu 18.04
Thank you! worked for matlab 2021b on ubuntu 20.04
Works. Can confirm for Ubuntu 20, MATLAB R2020a
yo! works like a charm Ubuntu 20.04 and MatLab R2022a
This worked, MATLAB R2022A on ubuntu 22.04
Thank you! It worked
MATLAB R2022B on Ubuntu 22.04
when i type matlabroot, i get the following output in my terminal:
matlabroot: command not found
matlabroot is a MATLAB command that would hae to be executed inside MATLAB. If you are operating inside MATLAB but the command fails, then you likely need to reinstall MATLAB.
matlabroot reports back the directory that MATLAB was installed into. If you are operating outside of MATLAB, there might be other ways to determine that information.
It works on Mac OS 13.5.1 (22G90) too.
Thank you! It works on Ubuntu 20 and MATLAB R2021b.
Thanks! It works for me on Ubuntu 24.04.1 LTS and MATLAB R2024b.

Sign in to comment.

Had a similar problem. Try Running it as a superuser: sudo Matlab
Then run the add on manager and download the ones you want.
If this does not work, you can try changing permissions of the installation folder using
sudo chmod -R o+rw /usr/local/Matlab/R2017X
(careful with this step, reading about permissions in Ubuntu recommended)

15 Comments

This helped me. Thank you very much!
this helped me too, thank you !
for the last version of matlab it's :
sudo chmod -R o+rw /usr/local/MATLAB/R2020a
Thanks. The chmod worked with Ubuntu 20.04.5 LTS and MATLAB R2022a
Thanks a lot! Worked on Ubuntu 22.04.1 LTS and Matlab R2020b
Thanks a lot. It worked for me too on Ubuntu 22.04.1 LTS and Matlab R2022b.
THANKS A TON !!!!!!!!!!!!!!!!!! IT WORKED LIKE A CHARM. YOU ARE A LIFE SAVER. APPRECIATE IT !!! GOD BLESS !!!

Sign in to comment.

If you want to avoid messing with folder permissions, here's what worked for me:
  1. Add an addon like normal until you get the permission error.
  2. Open a terminal and run "ps -eo cmd | grep AddOnProductInstaller | head -n 1"
  3. You should see AddOnProductInstaller from your installation dir with (very) long cmd line arguments.
  4. Run this as sudo

10 Comments

it doesn't work. the terminal will get stuck
Nice job! It works and doesn't effect any other setting. Genious idea!!!
This is the only way I could make it to work. Thanks!
Works on Ubuntu 20.04 4 LTS and MATLAB R2020b
Manually changing permissions for me worked too. As simple as it is. Ubuntu 22.04 LTS MATLAB R2022b.
2023a update: AddOnProductInstaller has been renamed to AddOnInstaller
updated command: `ps -eo cmd | grep AddOnInstaller | head -n 1`

Sign in to comment.

I have the same problem with Ubuntu 19.04 and matlab R2019b, for the installation I succed using sudo ./install instead of only ./install. But becasue the add-ones are installed trough matlab and not terminal I'm not able to use the sudo command. I tried all the solution proposed in this page but they weren't useful for me.
What should I do?

7 Comments

Type the following in the terminal:
sudo chmod -R o+rw /usr/local/MATLAB/R2020a
replace 'R2020a' with whatever version you are using.
Brilliant, worked for me on Arch Linux, thanks!
this is the only one that worked for me, I'm in 2022B matlab on pop_os! (ubuntu based) thank you!

Sign in to comment.

If you are running the Matlab in container and if this issue is persistent then this is how I solved the problem.
sudo chmod -R o+rw /opt/matlab/R2022b
sudo chown -R matlab:matlab /opt/matlab/R2022b
Then restart the Matlab and hope the problem is solved.
Hi Paul,
For any installation issues, you will want to contact MathWorks Technical Support. They will likely be able to help resolve this faster than waiting for a response on this forum!
Thanks all of you this discussion helped me a lot too.. same problem I had too
I also have similair problem. I installed matlabR2021b in ubuntu 21.04. But instead of sudo ./install just ./install worked for me. I installed MATLAB in home folder. But when I type matlab in terminal it is showing that matlab command not found. I have tried all of the above solutions and nothing worked for me.Plz help me.

3 Comments

If I understand your problem, it doesn't seem to be related to installing toolboxes. You just want to start MATLAB by running it from the terminal?
When you type a command into the terminal, it looks for a program in one of the folders in your PATH environment variable. If you want to run MATLAB from the terminal, you will have to add a symbolic link to one of these folders if the installer did not. For example, if MATLAB installed in ~/.local/
ln -s ~/.local/MATLAB/R2021b/bin/matlab ~/.local/bin/matlab
would hopefully get you what you want.
I recommend that you try installing toolboxes with administrative privileges. For instance:
sudo /usr/local/matlab/R2020a/bin/matlab

Sign in to comment.

So I had this battle today with ubuntu 20.04 and matlabR2022a. Tried everythin I found searching the internet but nothing seemed to work.
I ended up installing the needed toolboxes with the matlab installer

Categories

Asked:

on 11 Apr 2017

Commented:

菪
on 21 Nov 2024

Community Treasure Hunt

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

Start Hunting!