how to set cache_path directory of Lightweigh​tBrowser/j​cef_cache when Matlab startup

22 次查看(过去 30 天)
Hi,
I installed Matlab R2021b in linux cent os 7, and I changed my username for some reasons. I activated the Matlab before the username change, and after the username change, I reactivated the Matlab. Now the Matlab can be normally started from the terminal, but I always get below warning, seems like the cache_path of the "LightweightBrowser/jcef_cache" still do not recognize the new username. How could I solve the issue. Thanks.
[0320/024223.944137:ERROR:context.cc(220)] The cache_path directory (/home/MyOldUserName/.matlab/R2021b/LightweightBrowser/jcef_cache) could not be created.
[0320/024223.944252:ERROR:context.cc(235)] The cache_path is invalid. Defaulting to in-memory storage.
  3 个评论
Zuhui Wang
Zuhui Wang 2022-4-24
编辑:Zuhui Wang 2022-4-24
Hi Sébastien
I didnt have any progress yet.. since it seems like not affecting normal functioning of matlab, I put it aside right now. I think the warning mentioned cache_path should be a matlab environment variable to tell matlab where to save the cache of help doc, but I didnt find where the matlab defines this variable.
Sébastien Doré
Sébastien Doré 2022-5-25
Hi Zuhui,
Thanks for the follow-up. I put it aside for the same reason. I just hope it won't break something at some point down the road and cross my finger that a future upgrade (2022b) will solve it but I guess I'll leave it at that until then.
Regards,

请先登录,再进行评论。

采纳的回答

Zuhui Wang
Zuhui Wang 2023-5-7
编辑:Zuhui Wang 2023-5-7
Found a solution from magic ChatGPT :-D
Just create a soft link from your current home directory to the old home directory in your current home directory. For example, I renamed my home directory from /home/MyOldUserName/ to /home/MyNewUserName/ before installation of Matlab. And I saw the warning when startup the matlab. Then I create a soft link under my /home/MyNewUserName/ pointing to /home/MyNewUserName/ like below:
% close matlab before you run below code
cd /home/MyNewUserName
ln -s /home/MyNewUserName /home/MyOldUserName
Note, you may not see any softlink file using ls command, this may due to the lack of /home/MyOldUserName folder.
Then I restart matlab and the warning message are gone. BTW, I'm using CentOS Linux release 7.9.2009 (Core). Not sure if similar solution works for Windows.

更多回答(2 个)

Christopher Lanning
I can't say my course of action is advised, but it did work.
I first completely uninstalled matlab, then did a file search and deleted all lingering folders in my user profile folder and in the program folders.
Then I opened up registry editor and updated all references to my original user profile folder to my current user profile folder. There were a couple hundred of them.
Then I restarted and re-installed matlab and toolboxs.
No more debug.log file!
Again, use at your own descression. So far I have not detected any ill side effects, but playing around in the registry is always hazardous.
  1 个评论
Christopher Lanning
编辑:Christopher Lanning 2023-3-29
After some more use, the course of action I took is even less advised. I ran into an issue trying to upgrade from 2022a to 2022b. I don't remember the exact phrasing of the error, but it was evident that my monkeying around in the registry was the cause. I ended up doing a clean install of windows and all programs to fix it.

请先登录,再进行评论。


Evg
Evg 2023-3-29
Still relevant. Is there a way to solve the problem? Without removing the matlab

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by