Ubuntu 17.10安装MATLAB 2017a时遇‘archive is not a zip file’错误求助
Glad you got past the root installation hurdle using the xhost command and targeted Java directory! Now let's work through that annoying "archive is not a zip file" error—here are the most reliable fixes to test:
Verify your installation package integrity
MATLAB's installation archives are massive, so partial downloads or corrupted files are the #1 cause of this error. Check the MD5/SHA hash of your downloaded files against the official values from MathWorks. If they don't match, re-download the installation media with a stable internet connection to avoid interruptions.Check your installation file access method
If you're using an ISO image:- Make sure you mounted it correctly without errors. Unmount and remount it properly with these commands:
sudo umount /mnt/matlab-iso sudo mount -o loop /path/to/matlab2017a.iso /mnt/matlab-iso
If you extracted the archive manually:
- Skip
unzipfor large MATLAB archives—use7zinstead, as it handles big files more reliably:sudo apt install p7zip-full 7z x /path/to/matlab-archive.zip -o/mnt/matlab-extracted
- Make sure you mounted it correctly without errors. Unmount and remount it properly with these commands:
Double-check your Java environment setup
Even though you specified Java 8, confirm the path is valid and the JRE is fully installed:ls /usr/lib/jvm/java-8-openjdk-amd64/jre/If the directory is missing files, reinstall the openjdk-8-jre package:
sudo apt install --reinstall openjdk-8-jreYou can also try launching the installer without the
-javadirflag temporarily to use MATLAB's bundled Java (if included in your media) and see if that resolves the issue.Fix permissions for the installation directory
Ensure the root user has full read/write access to all installation files:sudo chown -R root:root /path/to/matlab-install-files sudo chmod -R 755 /path/to/matlab-install-files
Once you've tried these steps, re-run your installation command:
sudo sh ./install -javadir /usr/lib/jvm/java-8-openjdk-amd64/jre/
内容的提问来源于stack exchange,提问作者Vijey

