VPS侦探论坛

 找回密码
 注册
查看: 3606|回复: 3

离线安装PHP失败

[复制链接]
发表于 2021-12-9 16:56:12 | 显示全部楼层 |阅读模式


华为云主机

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
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 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 看能否正常安装,可以正常安装了就再装
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2021-12-10 14:34:20 | 显示全部楼层

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

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

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

  1. --> Finished Dependency Resolution
  2. Error: Package: glibc-2.17-260.el7.i686 (local-media)
  3.            Requires: glibc-common = 2.17-260.el7
  4.            Installed: glibc-common-2.17-323.el7_9.x86_64 (@updates)
  5.                glibc-common = 2.17-323.el7_9
  6.            Available: glibc-common-2.17-260.el7.x86_64 (local-media)
  7.                glibc-common = 2.17-260.el7
  8. You could try using --skip-broken to work around the problem
  9. You could try running: rpm -Va --nofiles --nodigest
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2021-12-12 11:13:21 | 显示全部楼层



更新后续解决方案:

当报此错后

  1. --> Finished Dependency Resolution
  2. Error: Package: glibc-2.17-260.el7.i686 (local-media)
  3.            Requires: glibc-common = 2.17-260.el7
  4.            Installed: glibc-common-2.17-323.el7_9.x86_64 (@updates)
  5.                glibc-common = 2.17-323.el7_9
  6.            Available: glibc-common-2.17-260.el7.x86_64 (local-media)
  7.                glibc-common = 2.17-260.el7
复制代码


经寻找解决方案得到  是因为存在重复的软件包,然后执行以下命令查询
  1. yum list --showduplicates glibc
复制代码

再下载安装完整的包
  1. yum downgrade glibc glibc-common glibc-devel glibc-headers
复制代码

此命令会自动将带有_9后缀的那些包给卸载了
然后再安装gcc
  1. yum install gcc
复制代码

再尝试安装libcurl-devel



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

  1. --> Finished Dependency Resolution
  2. Error:  Multilib version problems found. This often means that the root
  3.    cause is something else and multilib version checking is just
  4.    pointing out that there is a problem. Eg.:

  5.      1. You have an upgrade for nss-softokn-freebl which is missing some
  6.     dependency that another package requires. Yum is trying to
  7.     solve this by installing an older version of nss-softokn-freebl of the
  8.     different architecture. If you exclude the bad architecture
  9.     yum will tell you what the root cause is (which package
  10.     requires what). You can try redoing the upgrade with
  11.     --exclude nss-softokn-freebl.otherarch ... this should give you an error
  12.     message showing the root cause of the problem.

  13.      2. You have multiple architectures of nss-softokn-freebl installed, but.....
复制代码

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

  1. yum distribution-synchronization

  2. yum install nss-softokn-freebl.i686

  3. yum list installed | grep nss-softokn-freebl
复制代码


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


最后  安装LNMP  安装成功
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-6 07:11 , Processed in 0.026818 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表