Error: lua script failed (during update)

I just did an update and got a lua script error at the end, anyone knows why?

dracut[I]: *** Creating image file '/boot/initrd-6.10.9-1-default' ***
dracut[I]: *** Creating initramfs image file '/boot/initrd-6.10.9-1-default' done ***
%posttrans(kvm_stat-6.10.9-23.28.noarch) script output:
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
Detected unsafe path transition /usr/local (owned by yadav) -> /usr/local/man (owned by root) during canonicalization of usr/local/man.
error: lua script failed: [string "%transfiletriggerin(systemd-256.5-1.1.x86_64)..."]:6: exit code
Running post-transaction scripts ........................................................................................................................[done]

Show

ls -ld /usr/local

Odd that’s the only folder under my user, should I change it to “root root” like the others?

$ ls -ld /usr/local
drwxr-xr-x 11 yadav yadav 4096 Aug 31 14:48 /usr/local

I would not simply change, but try to find out how this could happen and what others are involved.

No idea how this occurred, I don’t personally work with “/usr/local”. All I did was a update like I always have done and this time I noticed the error message.

Sorry, but you did not explain and we have no list of what the several members here “do always”.

Nevertheless, to be sure, I would run a check which directories/files are owned by user yadav outside his/her home directory. Some variant of

find / -user yadav
1 Like

I have an alias that runs the commands:

sudo zypper refresh
sudo zypper dup -yl --auto-agree-with-product-licenses

Also this is a relatively fresh install of TW.

Thanks for that explanation. Next time you want to ask something about this (or any other commands) output, please show those commands and their complete output by copy/paste in the post (using preformatted text: Posting code or preformatted text - Using Discourse - Discourse Meta ). Thus people here can see what you did and what you got. Never assume they can look over your shoulder or can read your mind. And yes, because we can not know what your alas does, you have to revert back to the real commands in such a case.

But again, back to your problem. My advice, do such a test, because it is very strange that /usr/local changed owner.

I am going to guess it might have been when I installed ollama?

# find usr/ -user yadav

usr/local/lib/ollama
usr/local/lib/ollama/libcublas.so.11
usr/local/lib/ollama/libcublas.so
usr/local/lib/ollama/libcublasLt.so.12.4.2.65
usr/local/lib/ollama/libcudart.so
usr/local/lib/ollama/libcudart.so.11.0
usr/local/lib/ollama/libcublas.so.12
usr/local/lib/ollama/libcudart.so.12
usr/local/lib/ollama/libcudart.so.11.3.109
usr/local/lib/ollama/libcudart.so.12.4.99
usr/local/lib/ollama/libcublas.so.11.5.1.109
usr/local/lib/ollama/libcublasLt.so.11.5.1.109
usr/local/lib/ollama/libcublas.so.12.4.2.65
usr/local/lib/ollama/libcublasLt.so.12
usr/local/lib/ollama/libcublasLt.so
usr/local/lib/ollama/libcublasLt.so.11
usr/local/bin/tws
usr/local/bin/ollama

I still wonder how this error is triggered. The error message is from systemd (it is very deep in the common systemd library), but for the life of me I do not see why systemd would be interested in /usr/local/man path.

I tried changing /usr/local ownership and installing kvm_stat, but no errors. There must be some additional conditions.

1 Like

Probably.
But:

  • I do not know what ollema is;
  • I do not know where you got it from;
  • I do not know why this product, apparently going to be installed in a “system place” (/usr/local/...) does set ownership to “some” user (isn’t it installed by root ?).

Thus riddles again.

Ollama is Meta’s AI agent service, it allows you to download and run an AI model locally in the terminal.

Their install script is run like: (I can’t remember if it ask me for root permission?). Guess is yes since /usr/local is owned by root.

curl -fsSL https://ollama.com/install.sh | sh

ollama service

$ systemctl status ollama.service 
â—Ź ollama.service - Ollama Service
     Loaded: loaded (/etc/systemd/system/ollama.service; enabled; preset: disabled)
     Active: active (running) since Thu 2024-09-12 19:24:43 EDT; 9h ago
 Invocation: bd098307122d403695761c4970aa5c5f
   Main PID: 3563 (ollama)
      Tasks: 27 (limit: 76904)
        CPU: 13.973s
     CGroup: /system.slice/ollama.service
             └─3563 /usr/local/bin/ollama serve

Warning: some journal files were not opened due to insufficient permissions.

So I did change owner of /usr/local to “root root” and then tried to force install kvm_stat and didn’t see the script error.

$ sudo zypper in -f kvm_stat
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...
Forcing installation of 'kvm_stat-6.10.9-23.28.noarch' from repository 'repo-oss'.
Resolving package dependencies...

The following package is going to be reinstalled:
  kvm_stat

1 package to reinstall.

Package download size:    29.2 KiB

Package install size change:
            |      65.7 KiB  required by packages that will be installed
       0 B  |  -   65.7 KiB  released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: kvm_stat-6.10.9-23.28.noarch (repo-oss)                                                                                    (1/1),  29.2 KiB    
Retrieving: kvm_stat-6.10.9-23.28.noarch.rpm ........................................................................................................[done]

Checking for file conflicts: ........................................................................................................................[done]
(1/1) Installing: kvm_stat-6.10.9-23.28.noarch ......................................................................................................[done]
Running post-transaction scripts ....................................................................................................................[done]

I’m going to assume/hope my system is not messed up? :joy:

Who knows with third party software.

And why did it use user yadav?

In any case, it is you, as system manager, that is responsible for installing this. I have no idea what happens if you make all in /usr owned by root:root. I also do not know if the product has more surprises for you. :frowning:

1 Like

Hopefully its isolated to that location, and it’s pretty easy to check. If the AI stops working I’ll know it’s due to access permission and I can open a bug and tell them to fix the install/update scripts.

It seems to be working fine with “root” as the owner of /usr/local.

Thank you @hcvv and @arvidjaar for helping me investigate the error.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.