error in update Subprocess failed. Error: RPM failed: Command exited with status 1.

During update with YAST of my laptop using KDE I get these three errors:

Subprocess failed. Error: RPM failed: Command exited with status 1.History:
 - error: unpacking of archive failed on file /var/lib/dkms/dkms_dbversion: cpio: File from package already exists as a directory in system
   error: dkms-2.6.1-bp154.1.30.noarch: install failed
   error: dkms-2.3-bp153.1.17.noarch: erase skipped
   
   Subprocess failed. Error: RPM failed: Command exited with status 1.
History:
 - error: unpacking of archive failed on file /var/lib/dict/words: cpio: File from package already exists as a directory in system
   error: words-2015.02.15-bp154.1.46.noarch: install failed
   error: words-2015.02.15-bp153.1.15.noarch: erase skipped


   Subprocess failed. Error: RPM failed: Command exited with status 1.
History:
 - error: unpacking of archive failed on file /var/lib/misc/Makefile: cpio: File from package already exists as a directory in system
   error: glibc-extra-2.31-150300.41.1.x86_64: install failed
   error: glibc-extra-2.31-7.30.x86_64: erase skipped

how can I solve?

Update from what to what? Previous version in each case is from Leap 15.3 and new version is from Leap 15.4 (OK, glibc updates are shared between 15.3 and 15.4).

Post:

zypper lr -d

the update was yast>software management>package>all packages>update if a new version is available.
in yast>software management I can see that twords and dkms comes from main repository

here is:

pla@pla4ST:~> zypper lr -d
#  | Alias                                        | Name                                                                 
                       | Enabled | GPG Check | Refresh | Priority | Type     | URI                                       
                                      | Service
---+----------------------------------------------+----------------------------------------------------------------------
-----------------------+---------+-----------+---------+----------+----------+-------------------------------------------
--------------------------------------+--------
 1 | 15.2                                         | Tuxedo leap 15.4                                                     
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://rpm.tuxedocomputers.com/opensuse/1
5.4/                                  |  
 2 | ftp.gwdg.de-openSUSE_Leap_$releasever        | Packman direct-gwdg                                                  
                       | No      | ----      | ----    |   99     | rpm-md   | http://ftp.gwdg.de/pub/linux/misc/packman/
suse/openSUSE_Leap_15.4/              |  
 3 | openSUSE-Leap-${releasever}-1                | openSUSE-Leap-15.4-1                                                 
                       | No      | ----      | ----    |   99     | NONE     | hd:/?device=/dev/disk/by-id/usb-Verbatim_S
TORE_N_GO_07211470C205FE48-0:0-part2  |  
 4 | openSUSE_Factory                             | suse-network:/telephony(skype)                                       
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/network:/telephony/15.4/             |  
 5 | openSUSE_Factory_1                           | suse-/server:/messaging(telegram)                                    
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/server:/messaging/15.4/              |  
 6 | openSUSE_Leap_${releasever}                  | suse-/mozilla(firefox)                                               
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/mozilla/openSUSE_Leap_15.4/          |  
 8 | openSUSE_Leap_${releasever}_2                | suse-/security(ike-scan)                                             
                       | No      | ----      | ----    |   99     | NONE     | https://download.opensuse.org/repositories
/security/openSUSE_Leap_15.4/         |  
 9 | openSUSE_Leap_${releasever}_3                | suse-science(openSCAD)                                               
                       | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/repositories/
science/openSUSE_Leap_15.4/           |  
10 | openSUSE_Leap_${releasever}_4                | suse-Emulators:/Wine(Wine)                                           
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/repositories/
Emulators:/Wine/15.4/                 |  
11 | openSUSE_Leap_${releasever}_5                | suse-GNOME:/Apps                                                     
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/repositories/
GNOME:/Apps/15.4/                     |  
12 | openSUSE_Leap_${releasever}_6                | suse-M17N:/fonts                                                     
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/repositories/
M17N:/fonts/15.4/                     |  
13 | openSUSE_Leap_${releasever}_7                | suse-LibreOffice:/7.2                                                
                       | No      | ----      | ----    |   99     | NONE     | https://download.opensuse.org/repositories
/LibreOffice:/7.2/openSUSE_Leap_15.4/ |  
14 | openSUSE_Leap_${releasever}_8                | suse-network:/im(signal)                                             
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/network:/im:/signal/15.4/            |  
15 | openSUSE_Leap_${releasever}_9                | suse-home:/edogawa(KIM kde service menu)                             
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/home:/edogawa/15.4/                  |  
 7 | openSUSE_Leap_${releasever}_10               | suse-/graphics(paint)                                                
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/graphics/15.4/                       |  
16 | openSUSE_Leap_15.2                           | suse-TUXEDO                                                          
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/repositories/
isv:/TUXEDO/15.4/                     |  
17 | opensuse-guide.org-openSUSE_Leap_$releasever | Libdvdcss Repository                                                 
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://opensuse-guide.org/repo/openSUSE_Le
ap_15.4/                              |  
18 | packman-halifax                              | packman direct-halifax                                               
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | ftp://ftp.halifax.rwth-aachen.de/packman/s
use/openSUSE_Leap_15.4/               |  
19 | repo-backports-debug-update                  | Update repository with updates for openSUSE Leap debuginfo packages f
rom openSUSE Backports | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/update/leap/1
5.4/backports_debug/                  |  
20 | repo-backports-update                        | Update repository of openSUSE Backports                              
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/update/leap/1
5.4/backports/                        |  
21 | repo-debug                                   | Debug Repository                                                     
                       | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/debug/distrib
ution/leap/15.4/repo/oss/             |  
22 | repo-debug-non-oss                           | Debug Repository (Non-OSS)                                           
                       | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/debug/distrib
ution/leap/15.4/repo/non-oss/         |  
23 | repo-debug-update                            | Update Repository (Debug)                                            
                       | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/debug/update/
leap/15.4/oss/                        |  
24 | repo-debug-update-non-oss                    | Update Repository (Debug, Non-OSS)                                   
                       | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/debug/update/
leap/15.4/non-oss/                    |  
25 | repo-non-oss                                 | Non-OSS Repository                                                   
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/distribution/
leap/15.4/repo/non-oss/               |  
26 | repo-oss                                     | Main Repository                                                      
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/distribution/
leap/15.4/repo/oss/                   |  
27 | repo-sle-debug-update                        | Update repository with debuginfo for updates from SUSE Linux Enterpri
se 15                  | No      | ----      | ----    |   99     | NONE     | http://download.opensuse.org/debug/update/
leap/15.4/sle/                        |  
28 | repo-sle-update                              | Update repository with updates from SUSE Linux Enterprise 15         
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/update/leap/1
5.4/sle/                              |  
29 | repo-source                                  | Source Repository                                                    
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/source/distri
bution/leap/15.4/repo/oss/            |  
30 | repo-update                                  | Main Update Repository                                               
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/update/leap/1
5.4/oss/                              |  
31 | repo-update-non-oss                          | Update Repository (Non-Oss)                                          
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/update/leap/1
5.4/non-oss/                          |  
32 | repositoryST                                 | z-LOCAL-repository(zoom-ipscan)                                      
                       | Yes     | ( p) Yes  | Yes     |   99     | plaindir | dir:/dati/impo-conf/repositoryST          
                                      |  
33 | suse-devel:languages:gogocryptfs             | suse-devel:/languages:/go(gocryptfs)                                 
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/devel:/languages:/go/15.4/           |  
34 | suse-home:obs_mhogomchungusirikali_crypto    | suse-home:/obs_mhogomchungu(sirikali crypto)                         
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://download.opensuse.org/repositories
/home:/obs_mhogomchungu/15.4/         |  
35 | x86_64                                       | google(chrome)                                                       
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://dl.google.com/linux/chrome/rpm/stab
le/x86_64/                            |  
36 | x86_64_1                                     | brave(web browser)                                                   
                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | https://brave-browser-rpm-release.s3.brave
.com/x86_64/                          |  
pla@pla4ST:~> ^C
pla@pla4ST:~> 


Was this an Upgrade from Leap 15.3 to Leap 15.4?

Because:

LANG=C zypper se -s dkms
Loading repository data...
Reading installed packages...

S | Name | Type    | Version          | Arch   | Repository
--+------+---------+------------------+--------+----------------
  | dkms | package | 2.6.1-bp154.1.30 | noarch | Main Repository

Only 1 dkms package and you:

this was onli an update, but yes, about one month ago I did an upgrade from 15.3 to 15.4

So post:

zypper se -s dkms

or

zypper se -s glibc-extra

I would do:

rpm -e --nodeps dkms-2.3-bp153.1.17 words-2015.02.15-bp153.1.15 glibc-extra-2.31-7.30
zypper in dkms words glibc-extra
zypper up
zypper dup

The last I might answer N to for proceeding, depending on whether zypper succeeded to install the 15.4 versions of dkms, words and glibc-extra without errors. rpm -e --nodeps is a pretty common method of working past “cpio: File from package already exists as a directory in system”, a too often recent problem rpm can’t deal with directly.

here is:

pla@pla4ST:~> zypper se -s dkmsRepository 'suse-GNOME:/Apps' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'suse-network:/im(signal)' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...


S  | Name          | Type       | Version          | Arch   | Repository
---+---------------+------------+------------------+--------+------------------
i+ | dkms          | package    | 2.3-bp153.1.17   | noarch | (System Packages)
v  | dkms          | package    | 2.6.1-bp154.1.30 | noarch | Main Repository
   | dkms          | srcpackage | 2.6.1-bp154.1.30 | noarch | Source Repository
   | dkms-bbswitch | package    | 0.8-lp151.3.1    | noarch | Tuxedo leap 15.4
   | r8168-dkms    | package    | 8.040.00-10.57   | noarch | Tuxedo leap 15.4
pla@pla4ST:~> 
pla@pla4ST:~> zypper se -s glibc-extraRepository 'suse-GNOME:/Apps' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'suse-network:/im(signal)' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...


S  | Name        | Type    | Version          | Arch   | Repository
---+-------------+---------+------------------+--------+-------------------------------------------------------------
i+ | glibc-extra | package | 2.31-7.30        | x86_64 | (System Packages)
v  | glibc-extra | package | 2.31-150300.41.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v  | glibc-extra | package | 2.31-150300.37.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v  | glibc-extra | package | 2.31-150300.31.2 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v  | glibc-extra | package | 2.31-150300.26.5 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v  | glibc-extra | package | 2.31-150300.20.7 | x86_64 | Main Repository
pla@pla4ST:~> 

it seems it is gone well:

pla@pla4ST:~> rpm -e --nodeps dkms-2.3-bp153.1.17 words-2015.02.15-bp153.1.15 glibc-extra-2.31-7.30error: can't create transaction lock on /usr/lib/sysimage/rpm/.rpm.lock (Permission denied)
pla@pla4ST:~> su -
Password: 
pla4ST:~ # rpm -e --nodeps dkms-2.3-bp153.1.17 words-2015.02.15-bp153.1.15 glibc-extra-2.31-7.30
rm: cannot remove '/var/lib/systemd/migrated/dkms': No such file or directory
pla4ST:~ # 
pla4ST:~ # zypper in dkms words glibc-extraRetrieving repository 'suse-GNOME:/Apps' metadata .................................................................[done]
Building repository 'suse-GNOME:/Apps' cache ......................................................................[done]
Retrieving repository 'suse-network:/im(signal)' metadata .........................................................[done]
Building repository 'suse-network:/im(signal)' cache ..............................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...


The following 3 NEW packages are going to be installed:
  dkms glibc-extra words


3 new packages to install.
Overall download size: 847.2 KiB. Already cached: 0 B. After the operation, additional 3.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package dkms-2.6.1-bp154.1.30.noarch                                     (1/3),  74.1 KiB (200.1 KiB unpacked)
Retrieving: dkms-2.6.1-bp154.1.30.noarch.rpm ......................................................................[done]
Retrieving package words-2015.02.15-bp154.1.46.noarch                               (2/3), 708.5 KiB (  3.1 MiB unpacked)
Retrieving: words-2015.02.15-bp154.1.46.noarch.rpm ................................................................[done]
Retrieving package glibc-extra-2.31-150300.41.1.x86_64                              (3/3),  64.6 KiB ( 27.7 KiB unpacked)
Retrieving: glibc-extra-2.31-150300.41.1.x86_64.rpm ...............................................................[done]


Checking for file conflicts: ......................................................................................[done]
(1/3) Installing: dkms-2.6.1-bp154.1.30.noarch ....................................................................[done]
Updating /etc/sysconfig/words ...
(2/3) Installing: words-2015.02.15-bp154.1.46.noarch ..............................................................[done]
(3/3) Installing: glibc-extra-2.31-150300.41.1.x86_64 .............................................................[done]
pla4ST:~ # 



pla4ST:~ # zypper upLoading repository data...
Reading installed packages...


The following 3 items are locked and will not be changed by any action:
 Available:
  PackageKit aws-vault plasma-pass


The following 60 package updates will NOT be installed:
  alee-fonts cantarell-fonts dcraw dcraw-lang dejavu-fonts efont-unicode-bitmap-fonts ffmpeg-4 gdk-pixbuf-loader-libheif
  gimp-help gnome-shell-extension-onboard google-caladea-fonts google-carlito-fonts google-droid-fonts
  google-poppins-fonts google-roboto-fonts intlfonts-arabic-bitmap-fonts intlfonts-chinese-big-bitmap-fonts
  intlfonts-chinese-bitmap-fonts intlfonts-euro-bitmap-fonts intlfonts-japanese-big-bitmap-fonts
  intlfonts-japanese-bitmap-fonts khmeros-fonts libavcodec58_134 libavdevice58_13 libavfilter7_110 libavformat58_76
  libavresample4_0 libavutil56_70 libgexiv2-2 libgsm1 libgts-0_7-5 libheif1 libjbig2 libjpeg8 liblqr-1-0 libmtp-udev
  libmtp9 libnewt0_52 libopenjpeg1 libpostproc55_9 libpotrace0 libraw20 libspeex1 libspeexdsp1 libsrtp2-1
  libswresample3_9 libswscale5_9 libturbojpeg0 mypaint-brushes nautilus-share nautilus-share-lang onboard onboard-data
  onboard-lang patterns-fonts-fonts patterns-fonts-fonts_opt pavucontrol pavucontrol-lang raleway-fonts xkeyboard-config
Nothing to do.
pla4ST:~ # 
pla4ST:~ # zypper dupLoading 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...


Problem: problem with the installed QGnomePlatform-0.8.4-lp154.18.1.x86_64
 Solution 1: install QGnomePlatform-0.5-150400.7.5.x86_64 from vendor SUSE LLC <https://www.suse.com/>
  replacing QGnomePlatform-0.8.4-lp154.18.1.x86_64 from vendor obs://build.opensuse.org/GNOME
 Solution 2: keep obsolete QGnomePlatform-0.8.4-lp154.18.1.x86_64


Choose from above solutions by number or cancel [1/2/c/d/?] (c): 1
Resolving dependencies...
Computing distribution upgrade...


The following 3 items are locked and will not be changed by any action:
 Available:
  PackageKit aws-vault plasma-pass


The following 29 packages are going to be downgraded:
  QGnomePlatform adobe-sourcecodepro-fonts adobe-sourcesanspro-fonts adobe-sourceserifpro-fonts alee-fonts
  baekmuk-bitmap-fonts baekmuk-ttf-fonts cantarell-fonts dejavu-fonts efont-unicode-bitmap-fonts google-caladea-fonts
  google-carlito-fonts google-droid-fonts google-opensans-fonts google-poppins-fonts google-roboto-fonts
  google-roboto-slab-fonts hack-fonts inter-fonts intlfonts-arabic-bitmap-fonts intlfonts-chinese-big-bitmap-fonts
  intlfonts-chinese-bitmap-fonts intlfonts-euro-bitmap-fonts intlfonts-japanese-big-bitmap-fonts
  intlfonts-japanese-bitmap-fonts khmeros-fonts liberation-fonts raleway-fonts stix-fonts


The following package is going to change vendor:
  QGnomePlatform  obs://build.opensuse.org/GNOME -> SUSE LLC <https://www.suse.com/>


29 packages to downgrade, 1 to change vendor.
Overall download size: 71.4 MiB. Already cached: 0 B. After the operation, 157.9 KiB will be freed.
Continue? [y/n/v/...? shows all options] (y): y