bugcat 发表于 2021-12-9 16:56:12

离线安装PHP失败


华为云主机

CentOS Linux release 7.6.1810 (Core)

挂载了 CentOS-7-x86_64-Everything-2009.iso (因为没找到7.6)

16G内存40G硬盘

nginx和mysql(5.7) 都安装成功了

安装PHP失败,PHP7.4和PHP7.3都尝试过

以下是日志链接

https://wss1.cn/f/72qdvpbjl40


补充内容 (2021-12-9 17:09):
日志在github上放了一个新的链接
https://bugcat.github.io/lnmp-install-20211209.log

licess 发表于 2021-12-10 08:46:32

Error: Package: glib2-devel-2.56.1-7.el7.x86_64 (local-media)
         Requires: glib2(x86-64) = 2.56.1-7.el7
         Installed: glib2-2.56.1-8.el7.x86_64 (@updates)
               glib2(x86-64) = 2.56.1-8.el7
         Available: glib2-2.56.1-7.el7.x86_64 (local-media)
               glib2(x86-64) = 2.56.1-7.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
。。。。。。
Error: Package: glibc-2.17-317.el7.i686 (local-media)
         Requires: glibc-common = 2.17-317.el7
         Installed: glibc-common-2.17-323.el7_9.x86_64 (@updates)
               glibc-common = 2.17-323.el7_9
         Available: glibc-common-2.17-317.el7.x86_64 (local-media)
               glibc-common = 2.17-317.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
。。。。。。
--> Processing Dependency: libstdc++.so.6 for package: pcre-8.32-17.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: pcre-8.32-17.el7.i686
--> Processing Dependency: libgcc_s.so.1 for package: pcre-8.32-17.el7.i686
---> Package sqlite.i686 0:3.7.17-8.el7_7.1 will be installed
--> Processing Dependency: libtinfo.so.5 for package: sqlite-3.7.17-8.el7_7.1.i686
--> Processing Dependency: libreadline.so.6 for package: sqlite-3.7.17-8.el7_7.1.i686
--> Processing Dependency: libncurses.so.5 for package: sqlite-3.7.17-8.el7_7.1.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-317.el7 will be installed
--> Processing Dependency: glibc-common = 2.17-317.el7 for package: glibc-2.17-317.el7.i686
---> Package libgcc.i686 0:4.8.5-44.el7 will be installed
---> Package libstdc++.i686 0:4.8.5-44.el7 will be installed
---> Package ncurses-libs.i686 0:5.9-14.20130511.el7_4 will be installed
---> Package readline.i686 0:6.2-11.el7 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.17-317.el7.i686 (local-media)
         Requires: glibc-common = 2.17-317.el7
         Installed: glibc-common-2.17-323.el7_9.x86_64 (@updates)
               glibc-common = 2.17-323.el7_9
         Available: glibc-common-2.17-317.el7.x86_64 (local-media)
               glibc-common = 2.17-317.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
。。。。。。
Error: Package: python-devel-2.7.5-89.el7.x86_64 (local-media)
         Requires: python(x86-64) = 2.7.5-89.el7
         Installed: python-2.7.5-90.el7.x86_64 (@updates)
               python(x86-64) = 2.7.5-90.el7
         Available: python-2.7.5-89.el7.x86_64 (local-media)
               python(x86-64) = 2.7.5-89.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
依赖关系有问题了
你得用对应版本的光盘镜像才行,vault里面都有,可以 http://mirrors.aliyun.com/centos-vault/ 里面对应版本的isos目录下找
更改正确源后
再尝试 yum install yum-utils
然后 package-cleanup --cleandupes
yum clean all
最后 yum install libcurl-devel 看能否正常安装,可以正常安装了就再装

bugcat 发表于 2021-12-10 14:34:20

本帖最后由 bugcat 于 2021-12-10 14:36 编辑

将机器重启后重新下载并挂载了新的镜像 CentOS-7-x86_64-Everything-1810.iso

然后执行 yum install libcurl-devel 发现并不能正常安装提示代码如下:

--> Finished Dependency Resolution
Error: Package: glibc-2.17-260.el7.i686 (local-media)
         Requires: glibc-common = 2.17-260.el7
         Installed: glibc-common-2.17-323.el7_9.x86_64 (@updates)
               glibc-common = 2.17-323.el7_9
         Available: glibc-common-2.17-260.el7.x86_64 (local-media)
               glibc-common = 2.17-260.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

bugcat 发表于 2021-12-12 11:13:21

更新后续解决方案:

当报此错后

--> Finished Dependency Resolution
Error: Package: glibc-2.17-260.el7.i686 (local-media)
         Requires: glibc-common = 2.17-260.el7
         Installed: glibc-common-2.17-323.el7_9.x86_64 (@updates)
               glibc-common = 2.17-323.el7_9
         Available: glibc-common-2.17-260.el7.x86_64 (local-media)
               glibc-common = 2.17-260.el7


经寻找解决方案得到是因为存在重复的软件包,然后执行以下命令查询
yum list --showduplicates glibc
再下载安装完整的包
yum downgrade glibc glibc-common glibc-devel glibc-headers
此命令会自动将带有_9后缀的那些包给卸载了
然后再安装gcc
yum install gcc
再尝试安装libcurl-devel



但是再次安装时,又出现新的问题

--> 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 nss-softokn-freebl which is missing some
    dependency that another package requires. Yum is trying to
    solve this by installing an older version of nss-softokn-freebl 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 nss-softokn-freebl.otherarch ... this should give you an error
    message showing the root cause of the problem.

   2. You have multiple architectures of nss-softokn-freebl installed, but.....

经过寻找得到如下解决方案:

yum distribution-synchronization

yum install nss-softokn-freebl.i686

yum list installed | grep nss-softokn-freebl


然后再尝试安装libcurl-devel   就安装成功了。


最后安装LNMP安装成功
页: [1]
查看完整版本: 离线安装PHP失败