Executing yum command under centos always fails

王林
Release: 2020-03-30 11:43:26
Original
2322 people have browsed it

Executing yum command under centos always fails

Problem:

Executing the yum command displays the Could not resolve host: mirrorlist.centos.org; Unknown error error.

Solution:

1. Use the following command to add the DNS service in the resolve.conf file.

vi /etc/resolv.conf
Copy after login

Executing yum command under centos always fails

(Recommended tutorial: centos tutorial)

2. Use the following command to add DNS service to the ifcfg-ens33 file .

vi /etc/sysconfig/network-scripts/ifcfg-ens33
Copy after login

Executing yum command under centos always fails

#3. Use the following command to restart the network card.

service network restart
Copy after login

4. Use the yum command to install gcc and test whether yum works well.

yum -y install gcc pcre-devel openssl openssl-devel
Copy after login

The result is as shown:

Executing yum command under centos always fails

Recommended related video tutorials: linux video tutorial

The above is the detailed content of Executing yum command under centos always fails. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!