CentOS 7.0 using YUM to install MySQL error problem phenomenon
CentOS 7.0 has an error message similar to the following when installing MySQL with YUM:
File contains no section headers.
Cause of the problem
The software source does not contain related packages.
Treatment methods
Refer to the steps below to try to switch to the official CentOS software source.
1. Edit the source profile/etc/yum.repos.d/epel.repo to modify the content to the following:
[Epel]name=extra PackagesFor Enterprise Linux7-$basearch#baseurl =http://download.fedoraproject.org/pub/epel/7/$basearchmirrorlist =https://mirrors.fedoraproject.org/ metalink?repo=epel-7&arch=$basearchfailovermethod =priorityenabled=1gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-7 [Epel-debuginfo]name=extra PackagesFor Enterprise Linux7-$basearch-debug#baseurl =http://download.fedoraproject.org/pub/epel/7/$basearch/debugmirrorlist=https:// mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearchfailovermethod =priorityenabled=0gpgkey=file:///etc/pki/rpm-gpg/ rpm-gpg-key-epel-7gpgcheck=1 [epel-source]name=extra Packages for Enterprise Linux 7- $basearch- Source#baseurl =http://download.fedoraproject.org/pub/epel/7/srpmsmirrorlist=https:// mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearchfailovermethod = priorityenabled=0gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-7gpgcheck=1
2. Check the following instructions to load the new software source configuration:
$ yum makecache$ yum repolist:
3. Try reinstalling MySQL.
CentOS 6 configuration using Rpmforge software source
Rpmforge is a third-party software source repository and is a third-party software source recommended by the official CentOS community. The configuration steps are outlined below:
1. View System Architecture: Uname-i
2. Download the corresponding RPM package via tools such as wget:
- i686: "Click here to Download"
- x86_64: "Click here to Download"
3. Import the DAG GPG key using the following command:
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
4. Install the RPM package downloaded in step 2 using the following instructions:
$ rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm
5. To the/etc/yum.repos.d/directory check the installation situation:
See the Rpmforge related configuration file as shown, which indicates that the installation was successful.
CENTOS Yum Software source