Lua core version issue

In going to su (root) just started getting a lua version issue. Must be just a warning as I still went to root. Same message came up during dup update but didn’t stop everything.
See below:

(base) tom@mydesktop: ~ $ su -
Password: 
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/addto:65: in main chunk
        [C]: in ?
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/lmod:61: in main chunk
        [C]: in ?
mydesktop:~ #

All available lua is installed. See below:

(base) tom@mydesktop: ~ $ szi lua
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...
'lua' not found in package names. Trying capabilities.
'lua53' providing 'lua' is already installed.
'lua54' providing 'lua' is already installed.
'lua55' providing 'lua' is already installed.
'luajit' providing 'lua' is already installed.
Resolving package dependencies...
Nothing to do.
(base) tom@mydesktop: ~ $

Looks like some warning but would like to fix it.

thanks, tom kosvic

You need to figure out what you have set to run a lua script when a user logs in. That’s not some standard thing everyone else is seeing or running.

1 Like

This just started in the last day. I have made no purposeful change to anything login related. The same message came up during a “sudo zypper dup” this am. I didn’t capture the output surrounding that message. But that means It comes up more than when logging in.

Think I’ll look at the update history.

thanks for looking at my query, tom kosvic

In sudo zypper dup update, I also got same message and some additional ones. Perhaps these give some clue to cause. What logs might have some additional info?

194/201) Installing: nvidia-compute-G06-580.159.03-52.1.x86_64 ...............................................................................[done]
(195/201) Installing: nvidia-compute-utils-G06-580.159.03-52.1.x86_64 .........................................................................[done]
(196/201) Installing: nvidia-compute-G06-32bit-580.159.03-52.1.x86_64 .........................................................................[done]
(197/201) Installing: nvidia-userspace-meta-G06-580.159.03-51.1.x86_64 ........................................................................[done]
(198/201) Installing: nvidia-driver-G06-kmp-meta-580.159.03-51.1.x86_64 .......................................................................[done]
(199/201) Installing: MozillaThunderbird-openpgp-librnp-140.10.2-1.1.x86_64 ...................................................................[done]
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/addto:65: in main chunk
        [C]: in ?
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/lmod:61: in main chunk
        [C]: in ?
(200/201) Installing: MozillaThunderbird-140.10.2-1.1.x86_64 ..................................................................................[done]
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/addto:65: in main chunk
        [C]: in ?
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/lmod:61: in main chunk
        [C]: in ?
(201/201) Installing: MozillaFirefox-150.0.2-1.1.x86_64 .......................................................................................[done]
%transfiletriggerin(info-7.3-1.2.x86_64) script output:
install-info: warning: no info dir entry in `/usr/share/info/notes.info.gz'
Running post-transaction scripts ..............................................................................................................[done]
There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs.
 
Since the last system boot core libraries or services have been updated.
Reboot is suggested to ensure that your system benefits from these updates.
(base) tom@mydesktop: 

It looks like all the lua updates in 2026 were done this May from update history search.

I can’t figure out what app is making the lua requests.

Another possible clue. In going to root w/o the (-) I don’t get message. Using su -, I get the message. So what gets run when you use su - ?

(base) tom@mydesktop: ~ $ su
Password: 

(base) root@mydesktop: /home/tom $ su -
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/addto:65: in main chunk
        [C]: in ?
/usr/bin/lua5.5: version mismatch: app. needs 504.0, Lua core provides 505.0
stack traceback:
        [C]: in ?
        [C]: in global 'require'
        /usr/share/lua/5.4/posix/init.lua:23: in main chunk
        [C]: in global 'require'
        /usr/share/lmod/lmod/libexec/lmod:61: in main chunk
        [C]: i

@tckosvic do you not see the version difference in the output… AFAIK the default is lua 5.4 (It all I have installed), your alts is pointing at lua 5.5…

/usr/bin/lua5.5: version mismatch:
/usr/share/lua/5.4/.....

Is the lua 5.5 from Tumbleweed or from a non standard repo…

ls -la /usr/bin/lua*

I do see what it is saying re: version difference. But there are 3 lua versions installed as I showed in my first post. Something is calling wrong lua version for some reason and I can’t figure out what.

My system was updated from leap 15.6 to tumbleweed using opensise-migration-tool. All repos are standard tumbleweed repos as set up by openSUSE. I do have some special tumbleweed repos like science, games, etc. see below.

Maybe I should remove 5.3 and 5.5. Perhaps they can’t coexist. Especially if you only have 5.4.

(base) root@mydesktop: /home/tom $ sudo zypper lr -d
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
#  | Alias                           | Name               | Enabled | GPG Check | Refresh | Keep | Priority | Type   | URI                                                                            | Service
---+---------------------------------+--------------------+---------+-----------+---------+------+----------+--------+--------------------------------------------------------------------------------+---------
 1 | NVIDIA:repo-non-free            | repo-non-free      | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://download.nvidia.com/opensuse/tumbleweed                                | NVIDIA
 2 | brave                           | brave              | Yes     | (r ) Yes  | Yes     | -    |   95     | rpm-md | https://brave-browser-rpm-release.s3.brave.com/x86_64                          | 
 3 | electronics                     | electronics        | No      | ----      | ----    | -    |   99     | rpm-md | https://download.opensuse.org/repositories/electronics/openSUSE_Tumbleweed/    | 
 4 | ftp.gwdg.de-openSUSE_Tumbleweed | Packman Repository | No      | ----      | ----    | -    |   90     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/            | 
 5 | games                           | games              | No      | ----      | ----    | -    |   99     | rpm-md | https://download.opensuse.org/repositories/games/openSUSE_Tumbleweed/          | 
 6 | graphics                        | graphics           | No      | ----      | ----    | -    |   99     | rpm-md | https://download.opensuse.org/repositories/graphics/openSUSE_Tumbleweed/       | 
 7 | openSUSE:repo-non-oss           | repo-non-oss       | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://cdn.opensuse.org/tumbleweed/repo/non-oss                                | openSUSE
 8 | openSUSE:repo-openh264          | repo-openh264      | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://codecs.opensuse.org/openh264/openSUSE_Tumbleweed                       | openSUSE
 9 | openSUSE:repo-oss               | repo-oss           | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://cdn.opensuse.org/tumbleweed/repo/oss                                    | openSUSE
10 | openSUSE:repo-oss-debug         | repo-oss-debug     | No      | ----      | ----    | -    |   99     | N/A    | http://cdn.opensuse.org/debug/tumbleweed/repo/oss                              | openSUSE
11 | openSUSE:repo-oss-source        | repo-oss-source    | No      | ----      | ----    | -    |   99     | N/A    | http://cdn.opensuse.org/source/tumbleweed/repo/oss                             | openSUSE
12 | openSUSE:update-tumbleweed      | update-tumbleweed  | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://cdn.opensuse.org/update/tumbleweed                                      | openSUSE
13 | packman-essentials-repo         | Packman Essentials | Yes     | (r ) Yes  | Yes     | -    |   81     | rpm-md | https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/Essentials | 
14 | science                         | science            | No      | ----      | ----    | -    |   99     | rpm-md | https://download.opensuse.org/repositories/science/openSUSE_Tumbleweed/        | 
15 | vivaldi                         | vivaldi            | Yes     | (r ) Yes  | Yes     | -    |   95     | rpm-md | https://repo.vivaldi.com/archive/rpm/x86_64                                    | 
(base) root@mydesktop: /home/tom $ 

@tckosvic They can all co-exist, what does the ls -la /usr/bin/lua* show?

(base) tom@mydesktop: ~ $ ls -la /usr/bin/lua*
lrwxrwxrwx 1 root root      4 Aug 14  2025 /usr/bin/lua -> alts
-rwxr-xr-x 1 root root  22720 Aug  5  2025 /usr/bin/lua5.3
-rwxr-xr-x 1 root root  22720 Oct 16  2025 /usr/bin/lua5.4
-rwxr-xr-x 1 root root  22720 Dec 30 19:57 /usr/bin/lua5.5
lrwxrwxrwx 1 root root      4 Aug 14  2025 /usr/bin/luac -> alts
-rwxr-xr-x 1 root root  18736 Aug  5  2025 /usr/bin/luac5.3
-rwxr-xr-x 1 root root  26928 Oct 16  2025 /usr/bin/luac5.4
-rwxr-xr-x 1 root root  31024 Dec 30 19:57 /usr/bin/luac5.5
lrwxrwxrwx 1 root root     21 Oct 27  2025 /usr/bin/luajit -> luajit-2.1.1756211046
-rwxr-xr-x 1 root root 633128 Oct 27  2025 /usr/bin/luajit-2.1.1756211046
lrwxrwxrwx 1 root root     26 Feb 27 02:15 /usr/bin/luarocks -> /etc/alternatives/luarocks
-rwxr-xr-x 1 root root   1434 Feb 27 02:15 /usr/bin/luarocks-5.1
lrwxrwxrwx 1 root root     32 Feb 27 02:15 /usr/bin/luarocks-admin -> /etc/alternatives/luarocks-admin
-rwxr-xr-x 1 root root    916 Feb 27 02:15 /usr/bin/luarocks-admin-5.1
(base) tom@mydesktop: ~ $ 

The “lua” files themselves are all the same size so probably the same. The “luac” files are different.

@tckosvic and I suspect /usr/bin/lua -v and /usr/bin/luac -v does not show Lua 5.4.8?

So you need to look at update alternatives… /usr/sbin/update-alternatives --query lua

Not finding any reference to 5.4.8. Where did that come from?

(base) tom@mydesktop: ~ $ ls -al /usr/bin/lua -v
lrwxrwxrwx 1 root root 4 Aug 14  2025 /usr/bin/lua -> alts


(base) tom@mydesktop: ~ $ ls -al /usr/bin/luac -v
lrwxrwxrwx 1 root root 4 Aug 14  2025 /usr/bin/luac -> alts


(base) tom@mydesktop: ~ $ sudo /usr/sbin/update-alternatives --query lua
Name: lua
Link: /usr/bin/lua
Slaves:
 lua.1.gz /usr/share/man/man1/lua.1.gz
 luac /usr/bin/luac
 luac.1.gz /usr/share/man/man1/luac.1.gz
Status: auto
Best: /usr/bin/lua5.3
Value: none

Alternative: /usr/bin/lua5.3
Priority: 53
Slaves:
 lua.1.gz /usr/share/man/man1/lua5.3.1.gz
 luac /usr/bin/luac5.3
 luac.1.gz /usr/share/man/man1/luac5.3.1.gz
(base) tom@mydesktop: ~ $ 

@tckosvic the command I showed? /usr/bin/lua -v even then it’s pointing to 5.3, fix it up and should be fine as root user via update-alternatives command.

Not following your suggestions. Change link usr/bin/lua -v so it points to ???. 5.4 or 5.5 ???

Right now lua -v says v5.5

I just saw “alts” discussion. Never saw that before. So I should set alts for lua to what?

tom kosvic

@tckosvic you need to use the update-alternatives command and switch lua to the 5.4 version. It does the rest of the work…

sudo alts -s lua /usr/bin/lua5.4 doesn’t work!

@tckosvic With all due respect, I indicated the command to run, look at the man page or help output…

sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.4 99

It worked. No message after su -.

First I ever heard of “update-alternatives”.

thanks, tom kosvic