标题:Linux/CentOS下如何强制安装yum包~ 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Fri, 23 Jun 2017 20:50:12 +0000 作者:jackxiang 地址:http://jackxiang.com/post/9238/ 内容: 参考原文: yum install -y yum-downloadonly yum install PHP-MySQL -y --downloadonly --downloaddir=/opt rpm -ivh --force --nodeps php-mysql-5.3.3-22.el6.x86_64.rpm From:http://blog.csdn.net/anghlq/article/details/9165329 ===================================== 实践如下: yum install gcc autoconf cmake unzip vim libcurl-devel zlib-devel curl-devel expat-devel gettext-devel openssl-devel perl-devel nodejs libicu-devel wget curl mysql-devel 下载量:6.2 M 安装大小:31 M Is this ok [y/d/N]: y Downloading packages: (1/5): gettext-devel-0.18.2.1-4.el7.x86_64.rpm | 315 kB 00:00:00 (2/5): perl-Git-1.8.3.1-6.el7_2.1.noarch.rpm | 53 kB 00:00:00 (3/5): mariadb-devel-5.5.52-1.el7.x86_64.rpm | 750 kB 00:00:00 (4/5): mariadb-libs-5.5.52-1.el7.x86_64.rpm | 761 kB 00:00:00 (5/5): git-1.8.3.1-6.el7_2.1.x86_64.rpm | 4.4 MB 00:00:04 ----------------------------------------------------------------------------------------------------------------------- Transaction check error: file /etc/my.cnf from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package mysql-8.0.1-170622164613.el7.centos.x86_64 错误概要 ------------- yum install mariadb-libs-1:5.5.52-1.el7.x86_64 -y --downloadonly --downloaddir=/tmp rpm -ihv mariadb-libs-5.5.52-1.el7.x86_64.rpm --nodeps --force 已安装: gettext-devel.x86_64 0:0.18.2.1-4.el7 mariadb-devel.x86_64 1:5.5.52-1.el7 作为依赖被安装: git.x86_64 0:1.8.3.1-6.el7_2.1 perl-Git.noarch 0:1.8.3.1-6.el7_2.1 Generated by Jackxiang's Bo-blog 2.1.1 Release