Yum Commands Cannot Be Executed During Dedicated Software Porting
Symptom
When you run yum installation commands in a dedicated software porting task, an error message is displayed, as shown in the following figure.

Possible Causes
Before startup, a Yum process checks whether other Yum processes are running in the system. If yes, the Yum process waits until other Yum processes are stopped. To prevent system resources from being exhausted, the tool checks whether other Yum processes exist in the system before running a yum command. If yes, an error message will be displayed and the yum command will be stopped.
Troubleshooting Procedure
If it takes a long time to run a yum command, this is probably because that the Yum source configuration is incorrect or the network cannot be connected. You can perform the following steps to configure the local image source. The following uses CentOS 7.6 as an example.
- Mount the ISO image.
mount /root/CentOS-7-x86_64-Everything-1810.iso /media -o loop
- Back up the original Yum source. In the mv command, replace path with the actual backup directory.
cd /etc/yum.repos.d/ // Go to the Yum source configuration directory. mv ./* path // Back up the original Yum source configuration.
- Open the media.repo file.
vi /etc/yum.repos.d/media.repo
- Press i to enter the insert mode and add the following content to the media.repo file:
1 2 3 4 5 6 7
[InstallMedia] name=CentOS7.6 metadata_expire=-1 gpgcheck=0 cost=500 baseurl=file:///media enabled=1
- Press Esc, type :wq and press Enter to save the settings and exit.
- Update the local cache information of the Yum source.
yum clean all yum makecache
Parent topic: FAQs