Why do I receive Error 5013 - Unable to access services required to run MATLAB?

419 views (last 30 days)
When I try to launch MATLAB, I get the following error:
Unable to access services required to run MATLAB (error 5013).
How do I resolve this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Dec 2025 at 0:00
Edited: MathWorks Support Team on 7 Oct 2025
This error indicates that MATLAB has encountered a licensing issue. To resolve this error, try these possible solutions:    
Restart MATLAB 
If MATLAB is running, shut it down and restart it to see if that resolves the issue. 
macOS Only
On macOS only, if all other possible solutions do not resolve your issue, you may be able to apply the following workaround:
Open Terminal and run the following two commands one at a time: 
  • launchctl setenv MW_FEATURE_CurlOpenSSLMacOS 0
  • killall MathWorksServiceHost
Start MATLAB (if not already running).
Note: If you set the environment variable and the issue is resolved, it is only valid for that "log in session", after a reboot the environment variable is removed/reverted.
Restart the MathWorks Service Host 
The MathWorks Service Host is a critical required part of the MathWorks software installed on your machine. Try resolving the issue by restarting your computer. 
  1. Shut down MATLAB if it is still running. 
  2. End the MathWorksServiceHost process. Follow the instructions for your operating system. 

Windows 

Open the Command Prompt by searching for it from the Windows Start menu. Then, run this command: 
Taskkill /IM MathWorksServiceHost.exe /F 

macOS 

Open the Terminal app by searching for it in Spotlight Search. Spotlight Search is the magnifying glass in the top-right corner of your macOS screen. Then, run this command: 
killall MathWorksServiceHost 

Linux  

Open a terminal window. The way to open a terminal window depends on your Linux distribution. Then, run this command: 
killall MATLAB MathWorksServiceHost 
  1. Restart your computer. 
  2. Start MATLAB to see if the issue is resolved. 
Check for operating system updates 
Check your operating system for updates, and then download and install those updates.
Check computer for viruses
Malicious software on your computer may be preventing MATLAB from behaving correctly. You may need to repair your system before you can use MATLAB.
Disable antivirus software 
If your antivirus software has not been able to find any malicious software, the antivirus software itself may be causing MATLAB to malfunction. First try updating your antivirus software. If that doesn’t work, try temporarily disabling it and then launching MATLAB.
Reinstall the MathWorks Service Host
If the previous possible solutions do not resolve your issue, try reinstalling the MathWorks Service Host. Follow the instructions in How do I uninstall and reinstall the MathWorks Service Host? 
Contact support
If all other possible solutions do not resolve your issue, contact support
Include your MathWorks Service Host log files in the support case. To locate these files, see Where are the Installation, Activation, & Service Host log files located for MATLAB?

More Answers (0)

Categories

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

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!