Tag Archives: Yum

yum :Another app is currently holding the yum lock; waiting for it to exit……

How did “people you might know” find you on social software>>>

During the development process, you need to use the yum command. Sometimes you will report the following error when executing yum

Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  48 M RSS (443 MB VSZ)
    Started: Thu Mar 26 09:47:03 2020 - 00:23 ago
    State  : Running, pid: *****

Cause analysis: Yum can only support one routine. If one routine is already running, others must wait for the process to exit and release the lock. In this case,
can be restored with the following command:

rm -f /var/run/yum.pid

Record –

[Solved] Yum Install Error: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&am…

 

[root@venn09 ~]# yum install -y vim
Loaded plugins: fastestmirror
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"


 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

DNS server not found

Solution:

Configure /etc/resolv. Conf

Add the following:

nameserver 8.8.8.8  #google Provided dns servers
nameserver 8.8.4.4  #google Provided dns servers

Repeat. It’s done

When centos7 uses yum, file contains no section headers

After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>

this article is reproduced in https://blog.csdn.net/trokey/article/details/84908838

After installing celos7, the built-in Yum can’t be used directly. The following problems will occur when using it:

The reason is that no Yum source is configured. Modify the file/etc/yum.repos.d/cenos-base.repo as follows:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

The edit command is as follows:

vi /etc/yum.repos.d/CentOS-Base.repo

Save command

Press ESC to jump to command mode, and then:

: W save the file without quitting VI

: W file save the modification to the file and do not exit VI

:w! Force save, do not push VI

: WQ save the file and exit VI

:wq! Force save file and exit VI

Q: quit VI without saving the file

:q! Do not save the file, forced to exit VI

:e! Discard all changes and edit from the last time you saved the file

Or delete the original file first

rm -f  /etc/yum.repos.d/CentOS-Base.repo

Then download Alibaba’s

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Clean up cache

yum clean all

PS: if the above method is not solved, try the following:

Delete all files in the yum. Repos. D directory

rm -f /etc/yum.repos.d/*

Then download Alibaba’s

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Clean up cache

yum clean all

Test download install

yum install gcc

The following results are:

Solve the problem of protected multilib versions

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

Use Yum to install protected multilib versions. The reason is that multiple libraries cannot coexist. However, updating is not possible. However, you can add the following command after the installation command:

--setopt=protected_multilib=false

266963;20363d;p>

27604; 22914; 35013; zlib-develzlib-25191; 229141;20196; yum install -y zlib zlib-devel

Protected multilib version: zlib-1.2.7-17.el7.x86 64!= zlib-1.2.7-15.el7.i686

202044;2667925191; 20445; 35777; 35013; yum install -y zlib-devel –setopt=protected’u multilib=false

How to Solve Error: protected multilib versions

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

The system lacks a lib library libz. So. 1 file. If you use Yum to install, you will automatically find the relevant RPM package, as follows

# yum -y install libz.so.1

Resolving Dependencies
–> Running transaction check
—> Package zlib.i686 0:1.2.3-29.el6 will be installed
–> Finished Dependency Resolution
Error: Protected multilib versions: zlib-1.2.3-29.el6.i686 != zlib-1.2.3-27.el6.x86_ 64
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

Analysis reason: Yum has detected that the libz. So. 1 files we need are in zlib-1.2.3-29.el6.i686 and zlib-1.2.3-27.el6.x86_ Zlib-1.2.3-27.el6.x86 is installed in 64 bit system_ The libz. So. 1 file is located in the/lib64 directory, so yum gives an error prompt

Solution: add — setopt = protected at the end of the yum command_ Multilib = false statement

# yum -y install libz.so.1 –setopt=protected_ multilib=false

Conclusion: this parameter is very useful when installing 32-bit software package on 64 bit operating system without lib library dependency, because 64 bit operating system will install 64 bit lib Library in/lib64 directory by default, while 32-bit application needs lib Library in/lib directory, and the Lib library file name is the same, so the above conflict often occurs during installation

Implementation of commands similar to apt get install build essential in yum

After installing the system in Ubuntu, you can directly use the apt get install build essential command to install the commonly used development and compilation kits. In a system such as CentOS that uses Yum package management, there is a similar implementation method. The solution is to use the following command:

yum groupinstall “Development Tools”