排查命令行如下:
[root@centos7 opt]# rpm -ivh MySQL-server-5.5.48-1.linux2.6.i386.rpm
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
/usr/bin/perl is needed by MySQL-server-5.5.48-1.linux2.6.i386
libaio.so.1 is needed by MySQL-server-5.5.48-1.linux2.6.i386
libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6 is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.0) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.1) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.1.2) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.1.3) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.2) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.2.3) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.3) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libc.so.6(GLIBC_2.3.3) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libcrypt.so.1 is needed by MySQL-server-5.5.48-1.linux2.6.i386
libcrypt.so.1(GLIBC_2.0) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libdl.so.2 is needed by MySQL-server-5.5.48-1.linux2.6.i386
libdl.so.2(GLIBC_2.0) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libdl.so.2(GLIBC_2.1) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libm.so.6 is needed by MySQL-server-5.5.48-1.linux2.6.i386
libm.so.6(GLIBC_2.0) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libm.so.6(GLIBC_2.1) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libpthread.so.0 is needed by MySQL-server-5.5.48-1.linux2.6.i386
libpthread.so.0(GLIBC_2.0) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libpthread.so.0(GLIBC_2.1) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libpthread.so.0(GLIBC_2.2) is needed by MySQL-server-5.5.48-1.linux2.6.i386
libpthread.so.0(GLIBC_2.3.2) is needed by MySQL-server-5.5.48-1.linux2.6.i386
librt.so.1 is needed by MySQL-server-5.5.48-1.linux2.6.i386
librt.so.1(GLIBC_2.2) is needed by MySQL-server-5.5.48-1.linux2.6.i386
应对措施:yum install perl libaio.so.1 libc.so.6 libcrypt.so.1 libdl.so.2 libm.so.6 libpthread.so.0 librt.so.1 gcc(额外加这个gcc)
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
file /usr/share/mysql/charsets/README from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.5.48-1.linux2.6.i386 conflicts with file from package mariadb-libs-1:5.5.65-1.el7.x86_64
应对措施:yum remove mariadb-libs-1:5.5.65-1.el7.x86_64
[root@centos7 opt]# rpm -ivh MySQL-server-5.5.48-1.linux2.6.i386.rpm
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:MySQL-server-5.5.48-1.linux2.6 ################################# [100%]
libgcc_s.so.1 must be installed for pthread_cancel to work
libgcc_s.so.1 must be installed for pthread_cancel to work
libgcc_s.so.1 must be installed for pthread_cancel to work
/usr/bin/mysql_install_db: line 433: 1176 Done { echo "use mysql;"; cat $create_system_tables $fill_system_tables; }
1177 | eval "$filter_cmd_line"
1178 Aborted | $mysqld_install_cmd_line > /dev/null
Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.
You can try to start the mysqld daemon with:
shell> /usr/sbin/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before submitting a bug report
at http://bugs.mysql.com/
看上述可知并没有安装成功。
mariadb-libs-1:5.5.65-1.el7.x86_64
[root@centos7 opt]# yum install libgcc_s.so.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package libgcc.i686 0:4.8.5-44.el7 will be installed
--> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libgcc which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libgcc of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libgcc.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libgcc installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libgcc installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: libgcc-4.8.5-44.el7.i686 != libgcc-4.8.5-39.el7.x86_64
[root@centos7 opt]# rpm -qa | grep -i mysql
MySQL-server-5.5.48-1.linux2.6.i386
[root@centos7 opt]# cd /var/lib
[root@centos7 lib]# ls
alternatives chrony dhclient gssproxy initramfs machines mysql nfs polkit-1 rpcbind rpm-state samba systemd tuned
authconfig dbus games hyperv logrotate misc NetworkManager os-prober postfix rpm rsyslog stateless tpm yum
[root@centos7 lib]# cd mysql
[root@centos7 mysql]# ls
mysql RPM_UPGRADE_HISTORY RPM_UPGRADE_MARKER-LAST test
[root@centos7 mysql]# ll
total 8
drwx--x--x. 2 mysql mysql 6 May 1 09:14 mysql
-rw-r--r--. 1 root root 116 May 1 09:14 RPM_UPGRADE_HISTORY
-rw-r--r--. 1 mysql mysql 116 May 1 09:14 RPM_UPGRADE_MARKER-LAST
drwxr-xr-x. 2 mysql mysql 6 May 1 09:14 test
[root@centos7 mysql]# cd ..
[root@centos7 lib]# ls
alternatives chrony dhclient gssproxy initramfs machines mysql nfs polkit-1 rpcbind rpm-state samba systemd tuned
authconfig dbus games hyperv logrotate misc NetworkManager os-prober postfix rpm rsyslog stateless tpm yum
[root@centos7 lib]# ll
total 4
drwxr-xr-x. 2 root root 99 May 1 09:14 alternatives
drwx------. 3 root root 18 Apr 30 2020 authconfig
drwxr-xr-x. 2 chrony chrony 19 May 1 09:05 chrony
drwxr-xr-x. 2 root root 6 Mar 14 2019 dbus
drwxr-xr-x. 2 root root 6 Apr 2 2020 dhclient
drwxr-xr-x. 2 root root 6 Apr 11 2018 games
drwxr-xr-x. 4 root root 55 May 1 09:07 gssproxy
drwxr-xr-x. 2 root root 6 Oct 30 2018 hyperv
drwxr-xr-x. 2 root root 6 Apr 1 2020 initramfs
drwxr-xr-x. 2 root root 6 Apr 1 2020 logrotate
drwx------. 2 root root 6 Apr 30 2020 machines
drwxr-xr-x. 2 root root 6 May 1 09:14 misc
drwxr-xr-x. 4 mysql mysql 89 May 1 09:14 mysql
drwx------. 2 root root 258 May 1 09:07 NetworkManager
drwxr-xr-x. 5 root root 105 Apr 30 2020 nfs
drwxr-xr-x. 2 root root 6 Nov 6 2016 os-prober
drwxr-x---. 3 root polkitd 28 Apr 30 2020 polkit-1
drwx------. 2 postfix root 25 May 1 09:03 postfix
drwx------. 2 rpc rpc 6 Apr 1 2020 rpcbind
drwxr-xr-x. 2 root root 4096 May 1 09:08 rpm
drwxr-xr-x. 2 root root 6 Apr 11 2018 rpm-state
drwx------. 2 root root 29 May 1 09:14 rsyslog
drwxr-xr-x. 4 root root 33 Apr 30 2020 samba
drwxr-xr-x. 4 root root 35 Apr 30 2020 stateless
drwxr-xr-x. 4 root root 56 Apr 30 2020 systemd
drwx------. 2 tss tss 6 Aug 3 2017 tpm
drwxr-xr-x. 2 root root 6 Apr 2 2020 tuned
drwxr-xr-x. 6 root root 80 May 1 09:14 yum
[root@centos7 lib]# mysql
-bash: mysql: command not found
[root@centos7 lib]# ls
alternatives chrony dhclient gssproxy initramfs machines mysql nfs polkit-1 rpcbind rpm-state samba systemd tuned
authconfig dbus games hyperv logrotate misc NetworkManager os-prober postfix rpm rsyslog stateless tpm yum
[root@centos7 lib]# pwd
/var/lib
[root@centos7 lib]# cd /opt
[root@centos7 opt]# ls
MySQL-client-5.5.48-1.linux2.6.i386.rpm MySQL-server-5.5.48-1.linux2.6.i386.rpm
[root@centos7 opt]# rpm -qa | grep -i mysql
MySQL-server-5.5.48-1.linux2.6.i386
[root@centos7 opt]# rpm -e MySQL-server-5.5.48-1.linux2.6.i386
libgcc_s.so.1 must be installed for pthread_cancel to work
[root@centos7 opt]# rpm -qa | grep -i mysql
[root@centos7 opt]# yum install libgcc_s.so.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package libgcc.i686 0:4.8.5-44.el7 will be installed
--> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libgcc which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libgcc of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libgcc.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libgcc installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libgcc installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: libgcc-4.8.5-44.el7.i686 != libgcc-4.8.5-39.el7.x86_64
[root@centos7 opt]# rpm -qa | grep libgcc
libgcc-4.8.5-39.el7.x86_64
[root@centos7 opt]# rpm -e libgcc-4.8.5-39.el7.x86_64
error: Failed dependencies:
libgcc_s.so.1()(64bit) is needed by (installed) libstdc++-4.8.5-39.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) ncurses-libs-5.9-14.20130511.el7_4.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) pcre-8.32-17.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) gmp-1:6.0.0-15.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) groff-base-1.22.2-8.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) kmod-libs-20-28.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) glib2-2.56.1-5.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) gettext-libs-0.19.8.1-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) gettext-0.19.8.1-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) libicu-50.2-4.el7_7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) mozjs17-17.0.0-20.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) numactl-libs-2.0.12-5.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) dracut-033-568.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) kmod-20-28.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) systemd-libs-219-73.el7_8.5.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) systemd-219-73.el7_8.5.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) cups-libs-1:1.6.3-43.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) NetworkManager-libnm-1:1.18.4-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) NetworkManager-1:1.18.4-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) samba-client-libs-0:4.10.4-10.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) sg3_utils-1:1.37-19.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) NetworkManager-team-1:1.18.4-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) NetworkManager-tui-1:1.18.4-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) open-vm-tools-10.3.10-2.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) lshw-B.02.18-14.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) qemu-guest-agent-10:2.12.0-3.el7.x86_64
libgcc_s.so.1()(64bit) is needed by (installed) rsyslog-8.24.0-52.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) libstdc++-4.8.5-39.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) ncurses-libs-5.9-14.20130511.el7_4.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) pcre-8.32-17.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) gmp-1:6.0.0-15.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) groff-base-1.22.2-8.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) kmod-libs-20-28.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) glib2-2.56.1-5.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) libicu-50.2-4.el7_7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) numactl-libs-2.0.12-5.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) dracut-033-568.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) kmod-20-28.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) systemd-libs-219-73.el7_8.5.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) systemd-219-73.el7_8.5.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) cups-libs-1:1.6.3-43.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) NetworkManager-libnm-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) NetworkManager-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) samba-client-libs-0:4.10.4-10.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) sg3_utils-1:1.37-19.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) NetworkManager-team-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) NetworkManager-tui-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) open-vm-tools-10.3.10-2.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) lshw-B.02.18-14.el7.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by (installed) rsyslog-8.24.0-52.el7.x86_64
libgcc_s.so.1(GCC_3.3)(64bit) is needed by (installed) libstdc++-4.8.5-39.el7.x86_64
libgcc_s.so.1(GCC_3.3)(64bit) is needed by (installed) open-vm-tools-10.3.10-2.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) kmod-libs-20-28.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) glib2-2.56.1-5.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) gettext-0.19.8.1-3.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) numactl-libs-2.0.12-5.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) dracut-033-568.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) kmod-20-28.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) systemd-libs-219-73.el7_8.5.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) systemd-219-73.el7_8.5.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) NetworkManager-libnm-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) NetworkManager-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) samba-client-libs-0:4.10.4-10.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) sg3_utils-1:1.37-19.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) NetworkManager-team-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) NetworkManager-tui-1:1.18.4-3.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) open-vm-tools-10.3.10-2.el7.x86_64
libgcc_s.so.1(GCC_3.3.1)(64bit) is needed by (installed) rsyslog-8.24.0-52.el7.x86_64
libgcc_s.so.1(GCC_3.4)(64bit) is needed by (installed) qemu-guest-agent-10:2.12.0-3.el7.x86_64
libgcc_s.so.1(GCC_4.2.0)(64bit) is needed by (installed) libstdc++-4.8.5-39.el7.x86_64
[root@centos7 opt]# rpm -e libgcc-4.8.5-39.el7.x86_64 --force --nodeps
rpm: only installation and upgrading may be forced
[root@centos7 opt]# rpm -e libgcc-4.8.5-39.el7.x86_64 -force --nodeps
rpm: -force: unknown option
[root@centos7 opt]# rpm
RPM version 4.11.3
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
Usage: rpm [-aKfgpqVcdLilsiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires] [--whatprovides] [--nomanifest]
[-c|--configfiles] [-d|--docfiles] [-L|--licensefiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript]
[--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+] [--excludedocs] [--excludepath=<path>] [--force] [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch]
[--ignoreos] [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest] [--nocontexts] [--noorder] [--noscripts] [--notriggers] [--nocollections]
[--oldpackage] [--percent] [--prefix=<dir>] [--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test] [-U|--upgrade <packagefile>+] [--reinstall=<packagefile>+]
[-D|--define 'MACRO EXPR'] [--undefine=MACRO] [-E|--eval 'EXPR'] [--macros=<FILE:...>] [--noplugins] [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT]
[--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version] [-?|--help] [--usage] [--scripts] [--setperms] [--setugids] [--setcaps] [--restore]
[--conflicts] [--obsoletes] [--provides] [--requires] [--info] [--changelog] [--xml] [--triggers] [--last] [--dupes] [--filesbypkg] [--fileclass] [--filecolor]
[--fscontext] [--fileprovide] [--filerequire] [--filecaps]
[root@centos7 opt]# rpm -e --force --nodeps libgcc-4.8.5-39.el7.x86_64
rpm: only installation and upgrading may be forced
[root@centos7 opt]# yum install libgcc_s.so.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package libgcc.i686 0:4.8.5-44.el7 will be installed
--> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libgcc which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libgcc of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libgcc.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libgcc installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libgcc installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: libgcc-4.8.5-44.el7.i686 != libgcc-4.8.5-39.el7.x86_64
[root@centos7 opt]# rpm -qa | grep libgcc
libgcc-4.8.5-39.el7.x86_64
[root@centos7 opt]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-44.el7 will be installed
--> Processing Dependency: libgomp = 4.8.5-44.el7 for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-44.el7 for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: libgcc >= 4.8.5-44.el7 for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-44.el7.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-44.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-326.el7_9 will be installed
--> Processing Dependency: glibc-headers = 2.17-326.el7_9 for package: glibc-devel-2.17-326.el7_9.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-326.el7_9.x86_64
---> Package libgcc.x86_64 0:4.8.5-39.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-44.el7 will be an update
---> Package libgomp.x86_64 0:4.8.5-39.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-44.el7 will be an update
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-326.el7_9 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-326.el7_9.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-326.el7_9.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-1160.88.1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================
Installing:
gcc x86_64 4.8.5-44.el7 base 16 M
Installing for dependencies:
cpp x86_64 4.8.5-44.el7 base 5.9 M
glibc-devel x86_64 2.17-326.el7_9 updates 1.1 M
glibc-headers x86_64 2.17-326.el7_9 updates 691 k
kernel-headers x86_64 3.10.0-1160.88.1.el7 updates 9.1 M
libmpc x86_64 1.0.1-3.el7 base 51 k
mpfr x86_64 3.1.1-4.el7 base 203 k
Updating for dependencies:
libgcc x86_64 4.8.5-44.el7 base 103 k
libgomp x86_64 4.8.5-44.el7 base 159 k
Transaction Summary
============================================================================================================================================================================================
Install 1 Package (+6 Dependent packages)
Upgrade ( 2 Dependent packages)
Total download size: 33 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1/9): glibc-devel-2.17-326.el7_9.x86_64.rpm | 1.1 MB 00:00:00
(2/9): libgcc-4.8.5-44.el7.x86_64.rpm | 103 kB 00:00:00
(3/9): kernel-headers-3.10.0-1160.88.1.el7.x86_64.rpm | 9.1 MB 00:00:00
(4/9): glibc-headers-2.17-326.el7_9.x86_64.rpm | 691 kB 00:00:01
(5/9): libgomp-4.8.5-44.el7.x86_64.rpm | 159 kB 00:00:00
(6/9): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:00:00
(7/9): mpfr-3.1.1-4.el7.x86_64.rpm | 203 kB 00:00:00
(8/9): cpp-4.8.5-44.el7.x86_64.rpm | 5.9 MB 00:00:04
(9/9): gcc-4.8.5-44.el7.x86_64.rpm | 16 MB 00:00:15
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.1 MB/s | 33 MB 00:00:15
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mpfr-3.1.1-4.el7.x86_64 1/11
Installing : libmpc-1.0.1-3.el7.x86_64 2/11
Installing : cpp-4.8.5-44.el7.x86_64 3/11
Updating : libgomp-4.8.5-44.el7.x86_64 4/11
Updating : libgcc-4.8.5-44.el7.x86_64 5/11
Installing : kernel-headers-3.10.0-1160.88.1.el7.x86_64 6/11
Installing : glibc-headers-2.17-326.el7_9.x86_64 7/11
Installing : glibc-devel-2.17-326.el7_9.x86_64 8/11
Installing : gcc-4.8.5-44.el7.x86_64 9/11
Cleanup : libgomp-4.8.5-39.el7.x86_64 10/11
Cleanup : libgcc-4.8.5-39.el7.x86_64 11/11
Verifying : mpfr-3.1.1-4.el7.x86_64 1/11
Verifying : glibc-devel-2.17-326.el7_9.x86_64 2/11
Verifying : cpp-4.8.5-44.el7.x86_64 3/11
Verifying : glibc-headers-2.17-326.el7_9.x86_64 4/11
Verifying : gcc-4.8.5-44.el7.x86_64 5/11
Verifying : libmpc-1.0.1-3.el7.x86_64 6/11
Verifying : kernel-headers-3.10.0-1160.88.1.el7.x86_64 7/11
Verifying : libgcc-4.8.5-44.el7.x86_64 8/11
Verifying : libgomp-4.8.5-44.el7.x86_64 9/11
Verifying : libgcc-4.8.5-39.el7.x86_64 10/11
Verifying : libgomp-4.8.5-39.el7.x86_64 11/11
Installed:
gcc.x86_64 0:4.8.5-44.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-44.el7 glibc-devel.x86_64 0:2.17-326.el7_9 glibc-headers.x86_64 0:2.17-326.el7_9 kernel-headers.x86_64 0:3.10.0-1160.88.1.el7 libmpc.x86_64 0:1.0.1-3.el7
mpfr.x86_64 0:3.1.1-4.el7
Dependency Updated:
libgcc.x86_64 0:4.8.5-44.el7 libgomp.x86_64 0:4.8.5-44.el7
Complete!
[root@centos7 opt]# rpm -ivh MySQL-server-5.5.48-1.linux2.6.i386.rpm
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:MySQL-server-5.5.48-1.linux2.6 ################################# [100%]
libgcc_s.so.1 must be installed for pthread_cancel to work
[root@centos7 opt]# yum install libgcc_s.so.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package libgcc.i686 0:4.8.5-44.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================
Installing:
libgcc i686 4.8.5-44.el7 base 111 k
Transaction Summary
============================================================================================================================================================================================
Install 1 Package
Total download size: 111 k
Installed size: 190 k
Is this ok [y/d/N]: y
Downloading packages:
libgcc-4.8.5-44.el7.i686.rpm | 111 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : libgcc-4.8.5-44.el7.i686 1/1
Verifying : libgcc-4.8.5-44.el7.i686 1/1
Installed:
libgcc.i686 0:4.8.5-44.el7
Complete!
[root@centos7 opt]# rpm -qa | grep -i mysql
MySQL-server-5.5.48-1.linux2.6.i386
[root@centos7 opt]# cd /var/lib
[root@centos7 lib]# ls
alternatives chrony dhclient gssproxy initramfs machines mysql nfs polkit-1 rpcbind rpm-state samba systemd tuned
authconfig dbus games hyperv logrotate misc NetworkManager os-prober postfix rpm rsyslog stateless tpm yum
[root@centos7 lib]# rm -rf mysql
[root@centos7 lib]# ls
alternatives chrony dhclient gssproxy initramfs machines NetworkManager os-prober postfix rpm rsyslog stateless tpm yum
authconfig dbus games hyperv logrotate misc nfs polkit-1 rpcbind rpm-state samba systemd tuned
[root@centos7 lib]# cd /opt
[root@centos7 opt]# ls
MySQL-client-5.5.48-1.linux2.6.i386.rpm MySQL-server-5.5.48-1.linux2.6.i386.rpm
[root@centos7 opt]# rpm -e MySQL-server-5.5.48-1.linux2.6.i386
[root@centos7 opt]# rpm -qa | grep -i mysql
[root@centos7 opt]# rpm -ivh MySQL-server-5.5.48-1.linux2.6.i386.rpm
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:MySQL-server-5.5.48-1.linux2.6 ################################# [100%]
230501 9:32:44 [Note] /usr/sbin/mysqld (mysqld 5.5.48) starting as process 1429 ...
230501 9:32:44 [Note] /usr/sbin/mysqld (mysqld 5.5.48) starting as process 1436 ...
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h centos7 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems at http://bugs.mysql.com/
上述步骤中首先rpm -e卸载原先的mysql,同时还要删除默认数据记录目录/var/lib/mysql,之后再重新安装,上述的MySQL就成功安装了。
至此MySQL安装算是真正的成功了。真是辛酸了尝试好几次,我哭了。
其次安装完后我们需要知道它的配置文件的默认状态,如datadir默认在/var/lib/mysql
里面记录许多的日志信息。
还要知道my.cnf文件在/etc目录下,不过这里是没有的
MySQL服务器启动的话默认会读取my.cnf配置文件,相关的配置均是在此文件进行,若没有则它有一些默认的配置使其可以成功启动。
这里我明白一个问题,有些软件的默认状态是必须清楚的,要不然总是找不到配置文件放在哪。
例如如下当我们安装后没有做任何的相关配置,一切都是原始的如下:
默认文件都会放在哪里,这里一清二楚。
至此,拜拜了。