Search code examples
mysqlcentos

Install MySQL 5.1 on CentOS 6.9


I updated etc/yum.repos.d/CentOS-Base.repo file like that ($release=$releasever -> $release=6).

...
[base]
name=CentOS-$releasever -Base
mirrorlist=http://mirrorlist.centos.org/?release=6$arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch
...

And then updated yum too.

# sudo yum update
(base) [root@host ~]# yum list updates
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
 * base: mirrors.cat.pdx.edu
 * centos-sclo-rh: repos.lax.layerhost.com
 * centos-sclo-sclo: mirrors.cat.pdx.edu
 * epel: mirrors.kernel.org
 * extras: mirrors.vcea.wsu.edu
 * remi-php73: mirror.sjc02.svwh.net
 * remi-safe: mirror.sjc02.svwh.net
 * updates: sjc.edge.kernel.org

then, I tried to install MySQL but it didn't work correctly.

    # yum install mysql-server
    ...
    --> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-libs-4.8.0-59.el6.x86_64
    Package db4 is obsoleted by libdb4, but obsoleting package does not provide for requirements
    ---> Package sqlite.x86_64 0:3.6.20-1.el6_7.2 will be installed
    --> Processing Conflict: libdb4-4.8.30-13.el7.x86_64 conflicts filesystem < 3
    --> Finished Dependency Resolution
    Error: Package: rpm-4.8.0-59.el6.x86_64 (base)
               Requires: libdb-4.7.so()(64bit)
               Available: db4-4.7.25-22.el6.x86_64 (base)
                   libdb-4.7.so()(64bit)
    Error: Package: libdb4-utils-4.8.30-13.el7.x86_64 (epel)
               Requires: libc.so.6(GLIBC_2.14)(64bit)
    Error: Package: libdb4-4.8.30-13.el7.x86_64 (epel)
               Requires: libc.so.6(GLIBC_2.17)(64bit)
    Error: Package: iproute-2.6.32-57.el6.x86_64 (base)
               Requires: libdb-4.7.so()(64bit)
               Available: db4-4.7.25-22.el6.x86_64 (base)
                   libdb-4.7.so()(64bit)
    Error: Package: pam-1.1.1-24.el6.x86_64 (base)
               Requires: libdb-4.7.so()(64bit)
               Available: db4-4.7.25-22.el6.x86_64 (base)
                   libdb-4.7.so()(64bit)
    Error: Package: rpm-libs-4.8.0-59.el6.x86_64 (base)
               Requires: libdb-4.7.so()(64bit)
               Available: db4-4.7.25-22.el6.x86_64 (base)
                   libdb-4.7.so()(64bit)
    Error: libdb4 conflicts with filesystem-2.4.30-3.el6.x86_64
    Error: Package: cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64 (base)
               Requires: libdb-4.7.so()(64bit)
               Available: db4-4.7.25-22.el6.x86_64 (base)
                   libdb-4.7.so()(64bit)
    Error: Package: 4:perl-5.10.1-144.el6.x86_64 (base)
               Requires: libdb-4.7.so()(64bit)
               Available: db4-4.7.25-22.el6.x86_64 (base)
                   libdb-4.7.so()(64bit)
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest

How can I install MySQL on CentOS 6.9. Any version is ok. Any help is appreciated.


Solution

  • Error: Package: rpm-4.8.0-59.el6.x86_64 (base)

    Error: Package: libdb4-utils-4.8.30-13.el7.x86_64 (epel)

    You are obviously mixing EL6 and EL7 packages.

    Fix your installation by installing the proper EPEL configuration package.

    BTW, CentOS 6 is close to its end of life (in November) so I heartily recommend using a more modern version.