Error when logging in after installing Matlab 2022b

I have Matlab 2022b installed on Red Hat 8.7 computer. That required these packages:
  • Lmod
  • lua-posix packages
  • lua-filesystem
  • lua-term
  • tcl
Now I see this on a command line when I sign in with root or regular accounts via SSH:
/usr/bin/lua: /usr/share/lmod/lmod/libexec/addto:65: module 'posix' not found:
no field package.preload['posix']
no file '/usr/share/lua/5.4/posix.lua'
no file '/usr/share/lua/5.4/posix/init.lua'
no file '/usr/lib64/lua/5.4/posix.lua'
no file '/usr/lib64/lua/5.4/posix/init.lua'
no file '/usr/lib64/lua/5.4/posix.so'
no file '/usr/lib64/lua/5.4/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lmod/lmod/libexec/addto:65: in main chunk
[C]: in ?
/usr/bin/lua: /usr/share/lmod/lmod/libexec/addto:65: module 'posix' not found:
no field package.preload['posix']
no file '/usr/share/lua/5.4/posix.lua'
no file '/usr/share/lua/5.4/posix/init.lua'
no file '/usr/lib64/lua/5.4/posix.lua'
no file '/usr/lib64/lua/5.4/posix/init.lua'
no file '/usr/lib64/lua/5.4/posix.so'
no file '/usr/lib64/lua/5.4/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lmod/lmod/libexec/addto:65: in main chunk
[C]: in ?
/usr/bin/lua: /usr/share/lmod/lmod/libexec/addto:65: module 'posix' not found:
no field package.preload['posix']
no file '/usr/share/lua/5.4/posix.lua'
no file '/usr/share/lua/5.4/posix/init.lua'
no file '/usr/lib64/lua/5.4/posix.lua'
no file '/usr/lib64/lua/5.4/posix/init.lua'
no file '/usr/lib64/lua/5.4/posix.so'
no file '/usr/lib64/lua/5.4/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lmod/lmod/libexec/addto:65: in main chunk
[C]: in ?
I am not sure if this is related, but I mount an NFS share for the /home directories.
Are there any additional packages I need to install, or files I might be missing?

3 件のコメント

Suman
Suman 2023 年 2 月 14 日
Hi Tandrew,
You can try adding the following import before requiring the "posix" module:
require "luarocks.loader"
Please let me know whether it worked or not.
Cheers,
Suman
tandrew
tandrew 2023 年 2 月 14 日
I added that line to /usr/share/lmod/lmod/libexec/addto. I also installed luarocks, because I did not have it before. I also tried using a Red Hat 8 PC, with a local home directory instead of NFS. Now on both computers I get this slightly different message:
/usr/bin/lua: /usr/share/lmod/lmod/libexec/addto:65: module 'luarocks.loader' not found:
no field package.preload['luarocks.loader']
no file '/usr/share/lua/5.4/luarocks/loader.lua'
no file '/usr/share/lua/5.4/luarocks/loader/init.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader/init.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader.so'
no file '/usr/lib64/lua/5.4/loadall.so'
no file '/usr/lib64/lua/5.4/luarocks.so'
no file '/usr/lib64/lua/5.4/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lmod/lmod/libexec/addto:65: in main chunk
[C]: in ?
/usr/bin/lua: /usr/share/lmod/lmod/libexec/addto:65: module 'luarocks.loader' not found:
no field package.preload['luarocks.loader']
no file '/usr/share/lua/5.4/luarocks/loader.lua'
no file '/usr/share/lua/5.4/luarocks/loader/init.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader/init.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader.so'
no file '/usr/lib64/lua/5.4/loadall.so'
no file '/usr/lib64/lua/5.4/luarocks.so'
no file '/usr/lib64/lua/5.4/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lmod/lmod/libexec/addto:65: in main chunk
[C]: in ?
/usr/bin/lua: /usr/share/lmod/lmod/libexec/addto:65: module 'luarocks.loader' not found:
no field package.preload['luarocks.loader']
no file '/usr/share/lua/5.4/luarocks/loader.lua'
no file '/usr/share/lua/5.4/luarocks/loader/init.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader/init.lua'
no file '/usr/lib64/lua/5.4/luarocks/loader.so'
no file '/usr/lib64/lua/5.4/loadall.so'
no file '/usr/lib64/lua/5.4/luarocks.so'
no file '/usr/lib64/lua/5.4/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lmod/lmod/libexec/addto:65: in main chunk
[C]: in ?
Suman
Suman 2023 年 2 月 16 日
Hi Tandrew,
It seems that Lua is unable to get the exact path for locating desired packages. That's why the modules like "posix" and "luarocks.loader" are being shown as "Not found".
There are two environment variables LUA_PATH and LUA_CPATH which contain all the paths related to various Lua packages. You can add the paths used by "luarocks" to these environment variables using he following command:
eval "$(luarocks path)"
Please let me know whether this approach worked for you or not.
Cheers,
Suman

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

リリース

R2022b

質問済み:

2023 年 2 月 7 日

コメント済み:

2023 年 2 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by