[virtualbox] What to do when [Could not retrieve mirrorlist] appears when yum update is performed on CentOS7

When installing CentOS 7 with virtualbox

When the following error occurs

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 nic
        compromise:

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

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

Setting

vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
==========
Change
PEERDNS="no" #Change from yes

add to
NM_CONTROLLED="no"
==========
vi /etc/resolv.conf
==========
Change
nameserver 8.8.8.8
==========
service network restart

Recommended Posts

[virtualbox] What to do when [Could not retrieve mirrorlist] appears when yum update is performed on CentOS7
What to do if you get "The session could not be opened" when installing CentOS on VirtualBox
What to do when Japanese is not displayed on matplotlib
What to do when "Type Error: must be _socket.socket, not socket" appears on GAE
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
Notes on what to do when matplotlib scatter () / scatter3d () does not work
[Mac OS] What to do when Python is not installed as a framework. Is displayed when import matplotlib is performed.
What to do if CERTIFICATE_VERIFY_FAILED occurs when nltk.download () is done on macOS pyhon
What to do when "TypeError: must be string, not int…" appears when using strptime
What to do when "TypeError: data type not understood" appears in python's numpy.zeros
[EC2] What to do when selenium is stuck and processing does not proceed
What to do if Japanese language support is not completely installed on Ubuntu 16.04
[Python] Type Error:'WebElement' object is not iterable What to do when an error occurs
[Go 1.13] What to do when unexpected directory layout: appears
[openpyxl] What to do when IllegalCharacterError appears in pandas.DataFrame.to_excel
curl: (60) What to do when Issuer certificate is invalid.
What to do when python3 type venv does not work well on Raspberry Pi
What to do when is not in the sudoers file.This incident will be reported.
[Python] What to do when No module named'pyproj.datadir' appears when Exe is done with PyInstaller
What to do if SciPy installation fails on CentOS
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do if pyenv is not enabled (zsh)
What to do when a Missing artifact occurs in a jar that is not defined in pom.xml
What to do when PyCharm font is strange or garbled
What to do when "SSL: CERTIFICATE_VERIFY_FAILED _ssl.c: 1056" appears in Python
OSError: [Errno 40] What to do when Message too long appears
What to do when "Invalid HTTP_HOST header" appears in Django
[PySerial] What to think when a "could not open port'/ dev / cu." Error appears during serial communication on the micro: bit
[Beginner] What to do when "[Errno 2] File b'test.csv' does not exist: b'test.csv" is displayed when reading pandas csv
What to do if you get angry if you don't have libxml / xmlversion.h when installing lxml on CentOS
NameError: global name'dot_parser' is not defined and what to do when it comes up in python
What to do when the jupyterlab extension settings are not reflected
What to do if Insecure Platform Warning appears when running Python
What to do if the inode is exhausted on EC2 Linux
What to do when the value type is ambiguous in Python?
What to do if grep: empty (sub) expression appears on Mac grep
What to do when Ubuntu crashes
What to do if yum breaks
Steps to install VirtualBox on CentOS
What to do in my case when pyenv install is not possible after upgrading to macOS Big Sur
What to do when Japanese is not displayed on matplotlib
I get [Error 2055] when trying to connect to MySQL on Heroku
Python and pip commands are not available on CentOS (RHEL) 8
Ubuntu 20.04 does not start when trying to install nvidia driver
[virtualbox] What to do when [Could not retrieve mirrorlist] appears when yum update is performed on CentOS7
When I try to use pip, SSL module is not available.
What to do if you get "The session could not be opened" when installing CentOS on VirtualBox
Steps to install MySQL 8.0 on CentOS 8.1
Support when installing pillow on python3.9
Steps to install VirtualBox on CentOS
How to install PyPy on CentOS
UnicodeEncodeError when trying to run radon
How to install TensorFlow on CentOS 7
How to install Maven on CentOS
Notes on what to do when matplotlib scatter () / scatter3d () does not work
[Memorandum] What to do when a warning appears after executing pip list
What to do when the result downloaded via scrapy is in English
What to do when pyinstaller: error: argument --add-binary: invalid add_data_or_binary value: appears
[Docker] What to do when error Couldn't find the binary git appears
[Python] What to do when an error related to SSL authentication is returned
What to do if you get Could not fetch URL 443 with pip
What to do when a warning message is displayed in pip list
bash: cannot create temp file for here-document: What to do when No space left on device is displayed
Could not update pip due to ssl
How to update security on CentOS Linux 8
Log when I was worried that I could not connect to Wi-Fi on Linux
Example of what to do when the sample script does not work (OpenCV-Python)
What to do when a warning appears around Python integration in Neovim's CheckHealth
What to do if abort is displayed when inputting camera video in OpenCV
What to do when [Errno 2] No such file or directory appears in Python
What to do when the graph does not appear in jupyter (ipython) notebook
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What to do when matplotlib gets angry on CentOS saying "I'm using Agg so I can't issue a figure"