为什么安装composer总是失败,提示缺少phar?
参数:
Configure Command => './configure' '--prefix=/usr/local/php7' '--with-config-file-path=/usr/local/php7/etc' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--with-mysqli' '--with-pdo-mysql' '--with-iconv-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--without-pear' '--disable-phar' '--with-gettext' '--disable-fileinfo' '--enable-maintainer-zts'
[root@bogon php-7.1.11]# curl -sS https://getcomposer.org/installer | php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The phar extension is missing.
Install it or recompile php without --disable-phar
明明已经添加过了 --disable-phar 参数了,用 php -m 查看没有这个模块的?如何解决?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
直接在编辑的时候,删除了 --disable-phar 解决了
当年,我还用PHP5的时候碰到过个问题
sudo apt-get install php5-json
安装了这个包以后,莫名就好了,你是PHP7 试试 php7-josn,不知道包名是不是这样写