-bash: /usr/libexec/pk-command-not-found: Input/output error

I installed fedora 38 server edition on a remote physical computer.It was fine hours ago without poweroff or reboot.
Now I found that the cockpit console cannot respond and I refreshed the browser that connection failed.I try ssh with tty that all commands could not work. Including "sudo “,” su ", “ls”, all shows the error “-bash: /usr/libexec/pk-command-not-found: Input/output error”.
I have searched the Internet reset environment variable may work, but the fact problem is I couldn’t switch to the root user because of such error.

Do you have a hardware issue? Are there any clues in dmesg output?

This program is provided by PackageKit-command-not-found.

You can use dnf provides /usr/libexec/pk-command-not-found to find this information.

Villy’s response gives you an indication of how to get rid of the pk-command-not-found error, but this message really just shows up when you tell bash to run an executable it can’t find. If you install that utility, bash can try to tell you if you need to install another package to provide the executable. But your issue seems deeper. Can you copy the text from an ssh session and paste here preformatted (</>) so that we can see more of what’s going on? It seems odd that you can’t run ls, for example.

Its not going to be possible to run DNF if the user cannot become root.

Which is why I suspected hardware issues, the Input/output error seems to be the important part.

1 Like

By the way, “cd” works fine when it happened.
I reboot later and it goes well.May be it’s caused by disk.The /var/log/messages shows many logs like this:

Nov 2 10:18:04 localhost kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Nov 2 10:18:04 localhost kernel: ata1.00: cmd 61/d8:78:28:f5:e8/03:00:0a:00:00/40 tag 15 ncq dma 503808 out#012 res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Nov 2 10:18:04 localhost kernel: ata1.00: status: { DRDY }

Nov 2 10:18:04 localhost kernel: sd 0:0:0:0: [sda] tag#6 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=39s
Nov 2 10:18:04 localhost kernel: sd 0:0:0:0: [sda] tag#6 CDB: Write(10) 2a 00 0a e8 e6 40 00 03 20 00
Nov 2 10:18:04 localhost kernel: I/O error, dev sda, sector 183035456 op 0x1:(WRITE) flags 0x100000 phys_seg 7 prio class 2
Nov 2 10:18:04 localhost kernel: sd 0:0:0:0: [sda] tag#7 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=39s
Nov 2 10:18:04 localhost kernel: sd 0:0:0:0: [sda] tag#7 CDB: Write(10) 2a 00 0a ba 8d 10 00 02 18 00
Nov 2 10:18:04 localhost kernel: I/O error, dev sda, sector 179997968 op 0x1:(WRITE) flags 0x100000 phys_seg 67 prio class 2

Nov 2 10:18:04 localhost kernel: iomap_finish_ioend: 189 callbacks suppressed
Nov 2 10:18:04 localhost kernel: dm-0: writeback error on inode 176324952, offset 0, sector 179698016
Nov 2 10:18:04 localhost kernel: dm-0: writeback error on inode 176324956, offset 0, sector 176667920
Nov 2 10:18:04 localhost kernel: dm-0: writeback error on inode 176324948, offset 0, sector 176668160

So, looks like a disk or controller issue.

If you have the smartmontools package installed try running smartctl -a /dev/sda and see what the error log may tell you.

To me this sounds like drive failure or a bad/intermittent cable connection, or potentially a controller failing.

If possible one of the first things I would try to do would be power off and then disconnect and reconnect the drive cables in an attempt to rule out a bad connection. Maybe even replace the cable.

1 Like