如何卸载并重新安装 MathWorks Serive Host?

450 views (last 30 days)
如何卸载并重新安装 MathWorks Serive Host?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Aug 2025
Edited: MathWorks Support Team on 7 Aug 2025
MathWorks Service Host 是 MathWorks 软件的关键必需部分。如果遇到启动问题,卸载并重装 MathWorks Service Host可能会解决这些问题。请按照以下步骤操作:
MathWorks Service Host Re-installer(仅限 Linux)
在运行以下命令之前,请切换到您具有写入权限的目录,例如 ~/Downloads。运行 MathWorks Service Host Re-installer 时,请确保使用将要使用 MATLAB 的用户身份运行。
wget https://www.mathworks.com/MathWorksServiceHost/glnxa64/ReinstallMathWorksServiceHost chmod +x ReinstallMathWorksServiceHost ./ReinstallMathWorksServiceHost
手动重新安装:
注意:在执行以下操作时,不需要卸载和重新安装 MATLAB 本身。

1. 关闭 MATLAB

首先需要关闭所有 MATLAB 会话;请保存您的工作并关闭 MATLAB,然后再继续。

 

2. 卸载 MathWorks Service Host

运行以下命令以结束 MathWorksServiceHost 进程并删除其安装目录。

 

Windows
通过在 Windows 开始菜单中搜索“命令提示符”来打开此应用。然后依次运行以下两条命令:
Taskkill /IM MathWorksServiceHost.exe /F rd /s /q %localappdata%\MathWorks\ServiceHost %localappdata%\MathWorks\MATLABConnector
注意:此步骤请务必只使用命令提示符,以避免错误。
MacOS
通过在 Spotlight(屏幕右上角的放大镜图标)中搜索“Terminal”打开终端应用程序。然后依次运行以下命令:
killall MathWorksServiceHost rm -rf /Library/Application\ Support/MathWorks/ServiceHost ~/Library/Application\ Support/MathWorks/MATLABConnector

 

Linux 
打开终端窗口(打开方式取决于您的 Linux 发行版)。然后依次运行以下命令:
killall MATLAB MathWorksServiceHost rm -rf ~/.MathWorks/ServiceHost ~/.MATLABConnector

 

3. 重新启动 MATLAB

尝试启动 MATLAB,以查看问题是否已解决。此操作会自动重新安装 MathWorks Service Host。
如果在尝试上述方法后仍遇到错误,请查看 MathWorks Service Host 日志并联系支持人员。
要查看 MathWorks  Service Host 日志,请参阅以下文章:

More Answers (0)

Categories

Find more on 安装和许可简介 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!