求助 php7 如何安装 php70w-xml,搞了一下午了

2018-06-11 17:04:35 +08:00
 mmnnyycc

安装 lavavel,composer update 出现报错:phpunit/phpunit 6.5.8 requires ext-dom * -> the requested PHP extension dom is missing from your system

搜索问题,需要安装 php-xml。问题是:yum install php70w-xml:

[root@localhost ~]# yum install php70w-xml
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.shu.edu.cn
 * epel: mirrors.tongji.edu.cn
 * extras: mirrors.shu.edu.cn
 * updates: mirrors.shu.edu.cn
没有可用软件包 php70w-xml。
错误:无须任何处理

然后搜索 https://webtatic.com/packages/php70/,翻墙下载安装之后还是没有可用的软件包,yum search

yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

还是,没有可用的包。

[root@localhost ~]# yum list php7*
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.shu.edu.cn
 * epel: mirrors.tongji.edu.cn
 * extras: mirrors.shu.edu.cn
 * updates: mirrors.shu.edu.cn
已安装的软件包
php70w.x86_64                                                                                       7.0.30-1.w7                                                                              @webtatic
php70w-cli.x86_64                                                                                   7.0.30-1.w7                                                                              @webtatic
php70w-common.x86_64                                                                                7.0.30-1.w7                                                                              @webtatic
php70w-fpm.x86_64                                                                                   7.0.30-1.w7                                                                              @webtatic
php70w-gd.x86_64                                                                                    7.0.30-1.w7                                                                              @webtatic
php70w-mbstring.x86_64                                                                              7.0.30-1.w7                                                                              @webtatic
php70w-mysqlnd.x86_64                                                                               7.0.30-1.w7                                                                              @webtatic
php70w-pdo.x86_64 

求问怎么安装这个啊

842 次点击
所在节点    程序员
30 条回复
kslr
2018-06-11 20:18:50 +08:00
Php dom
qqjt
2018-06-11 20:19:58 +08:00
php7.0w-json
liaohongxing
2018-06-11 21:28:00 +08:00
ubuntu16.4lts 自带 php7.0 , 现在的版本是 php7.0.30 , ubuntu 官方跟随 php.net 升级 ,用 ubuntu server 吧。

apt install php7.0-xml 快速搞定
FYK
2018-06-11 22:25:38 +08:00
ubuntu 吧,这些会更方便些
hahaDashen
2018-06-12 02:12:06 +08:00
yum install php70w-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink | 7.5 kB 00:00
* epel: mirrors.sohu.com
* webtatic: us-east.repo.webtatic.com
base | 3.7 kB 00:00
epel | 3.2 kB 00:00
epel/primary | 3.2 MB 00:02
epel 12511/12511
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
webtatic | 3.6 kB 00:00
Setting up Install Process
Package php70w-xml-7.0.30-1.w6.x86_64 already installed and latest version
Nothing to do

我用的 http://mirror.webtatic.com/yum/el6/latest.rpm 这个 rpm (我 Centos6.9) 是有 xml 这个的
mmnnyycc
2018-06-12 10:23:10 +08:00
@hahaDashen 没办法,用的 centos7
mmnnyycc
2018-06-12 10:23:56 +08:00
@liaohongxing
@FYK 以后就 ubuntu 了
zqcolor
2018-06-12 10:34:04 +08:00
我用的这个可以

sudo yum install php70u-xml
mmnnyycc
2018-06-12 10:40:09 +08:00
@zqcolor #28 不行,估计只能编译了

```
[root@localhost ~]# yum install php70u-xml
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.nju.edu.cn
* epel: mirrors.tongji.edu.cn
* extras: mirrors.shu.edu.cn
* updates: mirrors.cn99.com
没有可用软件包 php70u-xml。
错误:无须任何处理

```
zqcolor
2018-06-12 10:42:14 +08:00
看来国内这几个源都没有这个 php-xml

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/462215

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX