MATLAB fails to start with errors indicating 'Unrecognized function or variable' despite multiple reinstallations and configuration checks on Ubuntu.

47 次查看(过去 30 天)
I am experiencing persistent issues with MATLAB on Ubuntu 22.04 LTS. After multiple attempts to install and configure MATLAB R2024a, including re-downloading and reinstalling the software, MATLAB fails to start correctly with error messages indicating 'Unrecognized function or variable' and other related errors.
Details:
1. Error Messages:
  • "Unrecognized function or variable 'matlabrc'."
  • "Unrecognized function or variable 'initprefs'."
  • "com.mathworks.jmi.MatlabException: Unrecognized function or variable 'initprefs'."
2. Steps Taken:
  • Installed MATLAB from the official .zip file.
  • Verified and set up environment variables.
  • Ensured required packages (like libcanberra-gtk-module) are installed.
  • Created symbolic links for MATLAB executable.
  • Checked for and verified the presence of key MATLAB files (matlabrc.m and userpath.m).
3. Observations:
  • The MATLAB executable works correctly when run from a terminal session where it was originally opened.
  • After restarting the computer or opening MATLAB from a new terminal, it shows the same errors.
  • The restoredefaultpath command is unrecognized, indicating potential issues with the MATLAB path or installation.
4. Commands and Outputs:
  • Commands attempted include: matlabroot, getenv('MATLABPATH'), rehash, restoredefaultpath
  • Output from ls -l commands show that necessary files (matlabrc.m, userpath.m) are present in /usr/local/MATLAB/R2024a/toolbox/local.
5. Current System Status:
  • MATLAB shows errors on startup related to missing functions or variables.
  • Symbolic links and environment variables appear to be correctly set, yet MATLAB does not function as expected after rebooting or in new terminal sessions.
I need assistance in diagnosing and resolving these startup errors to ensure MATLAB operates correctly and consistently after each reboot and in new terminal sessions. Any suggestions on further troubleshooting steps or configuration adjustments would be greatly appreciated.

回答(1 个)

Vandit
Vandit 2024-9-8,6:41
Hello Ágape,
Based on the information you've provided, it seems you've taken the correct steps for installing MATLAB R2024a on Ubuntu 22.04 LTS. Here are a few suggestions to troubleshoot the issue:
If the issue persists, you can go ahead and create a Service Request for the same (https://www.mathworks.com/support/contact_us.html?s_tid=hc_trail).
Hope this helps.

类别

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

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by