Home > OS >  Sudo yum update upgrade error No to the file or directory: '/var/lib/RPM Packages'
Sudo yum update upgrade error No to the file or directory: '/var/lib/RPM Packages'

Time:09-29

Update command, the result error:
$sudo yum upgrade

The Loaded plugins: branch, fastestmirror langpacks
Trying branch: stable
Loading mirror speeds from cached hostfile
Traceback (the most recent call last) :
The File "/usr/bin/yum", line 29, in & lt; module>
Yummain. User_main (sys. Argv [1], exit_code mentioned=True)
The File "/usr/share/yum - cli/yummain py", line 375, in user_main
Errcode=main (args)
The File "/usr/share/yum - cli/yummain py", line 184, the main in
The result, resultmsgs=base. DoCommands ()
The File "/usr/share/yum - cli/cli. Py", line 585, in doCommands
Return the self. Yum_cli_commands [self basecmd] doCommand (self, self. Basecmd, self. Extcmds)
The File "/usr/share/yum - cli/yumcommands py", line 1811, in doCommand
Ret=base. UpdatePkgs (extcmds, update_to=(basecmd=='upgrade - to'))
The File "/usr/share/yum - cli/cli. Py", line 1069, in updatePkgs
The self. The update ()
The File "/usr/lib/python2.7/site - packages/yum/set py", line 5181, in the update
Tx_return. The extend (self. Update (Po=new))
The File "/usr/lib/python2.7/site - packages/yum/set py", line 5363, in the update
If not the self. _valid_install_arch (available_pkg) :
The File "/usr/lib/python2.7/site - packages/yum/set py", line 4757, in _valid_install_arch
Ipkgs=self. RPMDB. SearchNames ([Po. Name])
The File "/usr/lib/python2.7/site - packages/yum/rpmsack. Py", line 1285, in searchNames
ReturnList. The extend (self. _search (name=name))
The File "/usr/lib/python2.7/site - packages/yum/rpmsack. Py", line 1351, in _search
Po=self. _makePackageObject (HDR, independence idx)
The File "/usr/lib/python2.7/site - packages/yum/rpmsack. Py", line 1377, in _makePackageObject
Self. _cached_rpmdb_mtime=OS. Path. Getmtime (rpmdbfname)
The File "/usr/lib64/python2.7/genericpath py", line, 54 in getmtime
Return OS. Stat (filename). St_mtime
OSError: [2] Errno No to the file or directory: '/var/lib/RPM Packages'

Do you have to understand, use ali cloud server, don't know why,

CodePudding user response:

Yum database lost/var/lib/RPM/Packages, you generate a,

CodePudding user response:

How to generate? Not too will, in the/var/lib/RPM Packages to create an empty folder?
  • Related