Procps problem boken ps and sysctl

ps does not work after upgrading Leap 15.4 to 15.5

ls -l /bin/ps
lrwxrwxrwx 1 root root 7 May  2  2023 /bin/ps -> /bin/ps

reinstall it with

zypper install procps

File /bin/ps
  from install of
     procps-3.3.15-150000.7.31.1.x86_64 (Main Repository)
  conflicts with file
     /usr/bin/ps
  from install of
     procps-3.3.15-150000.7.31.1.x86_64 (Main Repository)

same conflicts for pgrep, pkill, sysctl but only ps and sysctl are linked to themselves

1 Like

What is the output from:

ls -ld /bin  /usr/bin

I have:

# which ps
/usr/bin/ps
# rpm -qf /usr/bin/ps
procps-3.3.17-150000.7.37.1.x86_64
#

You should be able to force remove the old procps, then succeed with installing the new.

rpm -e --nodeps procps
zypper in procps

I don’t think so. His conflicts are for the same version.

Most likely, he has “/bin” as a symlink to “/usr/bin” which is wrong for Leap (but correct for Tumbleweed).

The same obsolete version. If he upgraded to 15.5 from 15.4, he should have the same newer version I’m running. Removing the old, removes the problem the old causes, I would expect, no?

OP, does zypper lr -d show any non-15.5 repos? If so, remove them.

The version he is showing is the one from the main repo, and that’s probably what is on the install DVD.

The strange thing in this thread for me is that we have some information about bin/ps and what zypper does, but nothing that shows what the infamous “it does not work” means. :frowning:

BTW:

henk@boven:~> ps
  PID TTY          TIME CMD
 6407 pts/0    00:00:00 bash
 6430 pts/0    00:00:00 ps
henk@boven:~> which ps
/usr/bin/ps
henk@boven:~> ls -l /usr/bin/ps
lrwxrwxrwx 1 root root 7 Dec  6 12:03 /usr/bin/ps -> /bin/ps
henk@boven:~> ls -l /bin/ps
-rwxr-xr-x 1 root root 134360 Dec  6 12:03 /bin/ps
henk@boven:~> ls -ld /bin /usr/bin
drwxr-xr-x 2 root root  4096 Feb  6 08:59 /bin
drwxr-xr-x 2 root root 90112 Feb  6 09:00 /usr/bin
henk@boven:~>

on an om-line upgraded from 15.4 > 15.5 system (some months ago).

Most likely, he has “/bin” as a symlink to “/usr/bin” which is wrong for Leap (but correct for Tumbleweed).

Yes this is correct, /bin is a symlink.
I added the Factory repo as some packages are no longer in Leap. Not sure if that caused this though. So what is the solution, replace /bin with an empty directory and reinstall?

Any link to itself results in something like this:

/bin/ps: Too many levels of symbolic links.

ie. does not work as expected

Reinstall what?

/bin is full of symlinks (and only eight other files). As soon as you empty /bin, I guess your system will almost unusable.

procps so the ps executable is actually added rather than the symlink

The idea is that one copies/pastes this (already in your first post) complete command and all output and unabridged as computer text. The story telling (and the posters personal conclusion) is always secondary in significance to the real computer facts.

So what can I do, reinstall the system from scratch? And how could it end up like this just using zypper to upgrade between Leap versions?

So you want to create an empty /bin and then only install porocps. And what about the more then 100 others that are in /bin.

I know, hopefully /usr/bin is in the path. I could add links for everything in /usr/bin to /bin if the system will work for long enough. But not a nice solution.

Will Leap and Tumbleweed converge on a consistent use of /bin?

As you are the only one that reports this (and most people here upgrded 15.4 > 15.5 already last year with many, many systems), I assume that only you may know what you did to create this. But I would not be amazed when it has something to do with your usage of Factory (which is more akin to Tumbleweed then Leap and it seems that Tumbleweed has a different /bin - /usr/bin structure). Again, we have no idea what you exactly did with Factory, not even if you added before or after the upgrade.

Factory moved to megred usr quite some time ago and it did exactly that - it replaced /bin with symlink to /usr/bin and moved binaries from /bin to /usr/bin. May be it is a bug in the script that was used, hard to tell.

So it is not a good idea to use the Factory repo on a Leap system? 15.5 appears to have less packages than 15.4 so I would have to move to Tumbleweed to get them. On other systems I found the constant updates in Tumbleweed too much.

It is very bad idea.

I haven’t found any docs or warnings in zypper making this clear.

Sounds like I need to reinstall the system then, the question is with what. Slowroll might be good for me if it were not experimental.