nvme-cli not installing: RPM failed: Command exited with status 1

Hello openSUSE’rs

I have just had a problem with a package during an upgrade. The package in question is nvme-cli:

# zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled  repositories. Make sure these repositories are compatible before you  continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

The following package is going to be upgraded:
  nvme-cli-bash-completion

1 package to upgrade.
Overall download size: 91.9 KiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving package nvme-cli-bash-completion-2.0~7-1.1.x86_64                                                                                               (1/1),  91.9 KiB ( 30.2 KiB unpacked)
Retrieving: nvme-cli-bash-completion-2.0~7-1.1.x86_64.rpm  ..............................................................................................................................[done]

Checking for file conflicts:  ...........................................................................................................................................................[done]
error: unpacking of archive failed on file  /usr/share/bash-completion/completions/nvme;6238c5cf: cpio: File from  package already exists as a directory in system
error: nvme-cli-bash-completion-2.0~7-1.1.x86_64: install failed
error: nvme-cli-bash-completion-2.0~6-1.1.x86_64: erase skipped
(1/1) Installing: nvme-cli-bash-completion-2.0~7-1.1.x86_64  ...........................................................................................................................[error]
Installation of nvme-cli-bash-completion-2.0~7-1.1.x86_64 failed:
Error: Subprocess failed. Error: RPM failed: Command exited with status 1.
Abort, retry, ignore? [a/r/i] (a):

There is a line telling me that some file already exists:

error: unpacking of archive failed on file  /usr/share/bash-completion/completions/nvme;6238c5cf: cpio: File from  package already exists as a directory in system

But that file does not exist:

# ls -lh /usr/share/bash-completion/completions/nvme/
total 32K
-rw-r--r-- 1 root root 31K 11 mar 17.46 bash-nvme-completion.sh

The open build service apparently reports no recent problem during the last build.

What could be the problem and a solution to this?

Thanks for any hint :slight_smile:

As a complement to the above post, I understand a bit more now. It seems that zypper is trying to install something called

cpio

but his exists already as folder:

# find /usr/share/bash-completion/completions -name cpio
/usr/share/bash-completion/completions/cpio

I will keep looking and thinking.

Ok, it seems that is may be a bug, it is already reported in bugzilla:

Bug 1197365](https://bugzilla.opensuse.org/show_bug.cgi?id=1197365) - Base:System/nvme-cli: nvme-cli-bash-completion-2.0~7-1.1.x86_64: install failed

nvme-cle was updated in the last snapshot (20220320).

Hopefully it will be fixed soon.

I had this issue too. You can probably wait until it’s fixed, but if you find it annoying, what I did to fix it was just delete the “/bash-completion/completions/nvme” folder and the update ran fine afterwards. I saw in that Bugzilla report you shared that the fix is on its way.

By the way, it’s not the installation of cpio, it’s just bash completions for nvme. It’s cpio that’s reporting that it can’t overwrite something that’s already there.

Thank you for the suggestion. I also saw that a fix is under way. It does not bother me. So I will wait until it is made available.

Hi,

I had the same problem, after a few days of waiting I followed some suggestions from an older forum thread, regarding a similar problem. Here is what I did.

I checked for dependencies, luckily in this case there are none:

> sudo rpm -q --whatrequires nvme-cli-bash-completion
no package requires nvme-cli-bash-completion

This means the problematic package can be removed manually:

sudo zypper remove --clean-deps nvme-cli-bash-completion

If you still want to have it, you can just install it again after it was removed:

sudo zypper in nvme-cli-bash-completion

Now I have chosen to clean the zypper repositories and force a refresh (this might be optional but still ok to do):

sudo zypper clean
sudo zypper ref -f

Finally run the distrib update command again:

sudo zypper dup

For me it worked this way, the update finished without issues.

Cheers!

Thank you, atti_simon. I saw that the package in question is not needed by any other package in my system so I just simply removed it.

it works…thanks man