Yum error Solution

Source: Internet
Author: User

1. First error

Previously, my Yum was quite useful, and then I suddenly went wrong. I couldn't install anything. All of them reported the following errors:

 

Loaded plugins: refresh-packagekit
Yumrepo warning: Not using FTP, HTTP [s], or file for repos, skipping-<HTML> Yumrepo warning: Not using FTP, HTTP [s], or file for repos, skipping-<meta http-equiv = "Content-Type" C>
Traceback (most recent call last ):
File "/usr/bin/yum", Line 29, in <module>
Yummain. user_main (SYS. argv [1:], exit_code = true)
File "/usr/share/Yum-cli/yummain. py", line 241, in user_main
Errcode = Main (ARGs)
File "/usr/share/Yum-cli/yummain. py", line 116, in Main
Result, resultmsgs = base. docommands ()
File "/usr/share/Yum-cli/CLI. py", line 307, in docommands
Self. _ getts ()
File "/usr/lib/python2.5/Site-packages/Yum/depsolve. py", Line 98, in _ getts
Self. _ gettsinfo ()
File "/usr/lib/python2.5/Site-packages/Yum/depsolve. py", line 104, in _ gettsinfo
Self. _ tsinfo. setdatabases (self. rpmdb, self. pkgsack)
File "/usr/lib/python2.5/Site-packages/Yum/_ init _. py", line 576, in <Lambda>
Pkgsack = property (fget = Lambda self: Self. _ getsacks (),
File "/usr/lib/python2.5/Site-packages/Yum/_ init _. py", line 419, in _ getsacks
Self. Repos. populatesack (which = repos)
File "/usr/lib/python2.5/Site-packages/Yum/repos. py", line 245, in populatesack
Sack. populate (repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 149, in populate
If self. _ check_db_version (repo, mydbtype ):
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 203, in _ check_db_version
Return Repo. _ check_db_version (mdtype)
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 928, in _ check_db_version
Repoxml = self. repoxml
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 1086, in <Lambda>
Repoxml = property (fget = Lambda self: Self. _ getrepoxml (),
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 1078, in _ getrepoxml
Self. _ loadrepoxml (text = self)
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 1068, in _ loadrepoxml
Return self. _ grouploadrepoxml (text, ["primary"])
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 1052, in _ grouploadrepoxml
If self. _ commonloadrepoxml (text ):
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 904, in _ commonloadrepoxml
Result = self. _ getfilerepoxml (local, text)
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 772, in _ getfilerepoxml
Cache = self. http_caching = 'all ')
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 643, in _ GetFile
Result = self. Grab. urlgrab (relative, local,
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 463, in <Lambda>
Grab = property (lambda self: Self. _ getgrab ())
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 458, in _ getgrab
Self. _ setupgrab ()
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 447, in _ setupgrab
Self. _ grab = mgclass (self. _ grabfunc, self. URLs,
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 548, in <Lambda>
URLs = property (fget = Lambda self: Self. _ geturls (),
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 545, in _ geturls
Self. _ baseurlsetup ()
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 514, in _ baseurlsetup
Self. Required URLs = self. _ replace_and_check_url (required URLs)
File "/usr/lib/python2.5/Site-packages/Yum/yumrepo. py", line 536, in _ replace_and_check_url
Print 'yum repo warning: Not using FTP, HTTP [s], or file for repos, skipping-% s' % (URL)
File "/usr/lib/python2.5/codecs. py", line 303, in write
Data, consumed = self. encode (object, self. Errors)
Unicodedecodeerror: 'ascii 'codec can't decode byte 0xbb in position 78: ordinal not in range (128)

 

 

So I checked it online. Someone said it was a problem with fastmirror, so I used

Yum remove Yum-fastmirror

This command also reported the above error ^ _ ^, So I continued to Google and finally found a solution;

Yum clean all

This error will no longer be reported for Yum and fastmirror will continue to be used.

 

 

If you know why, you need to know why. So Man yum, you can see that the role of the clean option is:

Is used to clean up varous things which accumulate in the yum
Cache directory over time. More Complete details can be found

In the clean options section below.

This command is used to clear the packages and old headers in the cache directory (/var/Cache/YUM ).
Command: Yum clean, yum clean all (= Yum clean packages; YUM clean oldheaders)

 

2. Second error:

[Root @ macross Internet access in Linux] # Yum install unrar
Load plug-in: refresh-packagekit
The lock has been used by/var/run/yum. PID: Another replication is running on PID 3230.
Another application is applying the yum lock; wait for it to exit ......
Another application is applying the yum lock; wait for it to exit ......
Another application is applying the yum lock; wait for it to exit ......
Another application is applying the yum lock; wait for it to exit ......

 

 

That's because other processes are using yum.
Use kill-9 3230. If there are other items in use, change the number.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.