编译的mysql与已经存在的mysql冲突

编译的mysql与已经存在的mysql冲突

我刚刚从源代码安装了 mysql,并使用 paco 包装器查看“make install”的文件复制位置。根据 paco 日志,我有以下内容:

/usr/local/mysql/lib/libmysqlclient.a
/usr/local/mysql/lib/libmysqlclient.so
/usr/local/mysql/lib/libmysqlclient.so.18
/usr/local/mysql/lib/libmysqlclient.so.18.1.0
/usr/local/mysql/lib/libmysqlclient_r.a
/usr/local/mysql/lib/libmysqlclient_r.so
/usr/local/mysql/lib/libmysqlclient_r.so.18
/usr/local/mysql/lib/libmysqlclient_r.so.18.1.0
/usr/local/mysql/lib/libmysqld.a
/usr/local/mysql/lib/libmysqlservices.a
/usr/local/mysql/lib/plugin/adt_null.so
/usr/local/mysql/lib/plugin/auth.so
/usr/local/mysql/lib/plugin/auth_socket.so
/usr/local/mysql/lib/plugin/auth_test_plugin.so
/usr/local/mysql/lib/plugin/daemon_example.ini
/usr/local/mysql/lib/plugin/libdaemon_example.so
/usr/local/mysql/lib/plugin/mypluglib.so
/usr/local/mysql/lib/plugin/qa_auth_client.so
/usr/local/mysql/lib/plugin/qa_auth_interface.so
/usr/local/mysql/lib/plugin/qa_auth_server.so
/usr/local/mysql/lib/plugin/semisync_master.so
/usr/local/mysql/lib/plugin/semisync_slave.so
/usr/local/mysql/lib/plugin/validate_password.so

此时我意识到在源代码安装之前我没有删除一些旧的 mysql debian 软件包。
命令的输出:

sudo dpkg --get-selections | grep mysql

在下面 :

libdbd-mysql-perl               install
libmysqlclient18                install
mysql-client-5.5                install
mysql-client-core-5.5           install
mysql-common                    install
mysql-server                    install
mysql-server-5.5                install
mysql-server-core-5.5           install

现在我担心编译后的软件包和已安装的软件包之间存在冲突。有人能建议一种方法来删除已安装的 debian 软件包,以便系统中只存在编译后的软件包吗?

先感谢您。

答案1

可以通过以下步骤纠正此问题

sudo apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5 mysql-client-5.6 mysql-server-5.6 
sudo apt-get autoremove
sudo apt-get autoclean

清理以前安装的残留和冲突

sudo rm -rf /etc/mysql

安装新版本 sudo apt-get install mysql-server5.6 mysql-common mysql-client

链接并重新启动 apparmor

sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/usr.sbin.mysqld
sudo /etc/init.d/apparmor restart

现在检查安装情况

相关内容