首页   注册   登录
 q569321245 最近的时间轴更新

q569321245

V2EX 第 425569 号会员,加入于 2019-06-29 12:00:01 +08:00
q569321245 最近回复了
13 天前
回复了 q569321245 创建的主题 PHP 有一个诡异的缓存问题 望大家帮忙看看( PHP )
指的是 哪里的 opcache
sudo /usr/local/bin/composer create-project mix/mix --prefer-dist 执行这条语句报了下面的错
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested PHP extension ext-redis * is missing from your system. Install or enable PHP's redis extension.
Problem 2
- The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.


但是我打印 /usr/local/bin/composer show -p
composer-plugin-api 1.1.0 The Composer Plugin API
ext-amqp 1.9.3 The amqp PHP extension
ext-bcmath 7.1.0 The bcmath PHP extension
ext-ctype 7.1.0 The ctype PHP extension
ext-curl 7.1.0 The curl PHP extension
ext-date 7.1.0 The date PHP extension
ext-dom 20031129 The dom PHP extension
ext-fileinfo 1.0.5 The fileinfo PHP extension
ext-filter 7.1.0 The filter PHP extension
ext-ftp 7.1.0 The ftp PHP extension
ext-gd 7.1.0 The gd PHP extension
ext-gettext 7.1.0 The gettext PHP extension
ext-hash 1.0 The hash PHP extension
ext-iconv 7.1.0 The iconv PHP extension
ext-json 1.5.0 The json PHP extension
ext-libxml 7.1.0 The libxml PHP extension
ext-mbstring 7.1.0 The mbstring PHP extension
ext-mcrypt 7.1.0 The mcrypt PHP extension
ext-mysqli 7.1.0 The mysqli PHP extension
ext-mysqlnd 0 The mysqlnd PHP extension (actual version: mysqlnd 5.0.12-dev - 20150407 - $Id: d8daadaf41e3cd81d7c6ae96c6091fd15b2c9382 $)
ext-openssl 7.1.0 The openssl PHP extension
ext-pcre 7.1.0 The pcre PHP extension
ext-PDO 7.1.0 The PDO PHP extension
ext-pdo_mysql 7.1.0 The pdo_mysql PHP extension
ext-pdo_sqlite 7.1.0 The pdo_sqlite PHP extension
ext-Phar 2.0.2 The Phar PHP extension
ext-posix 7.1.0 The posix PHP extension
ext-redis 4.0.2 The redis PHP extension
ext-Reflection 7.1.0 The Reflection PHP extension
ext-session 7.1.0 The session PHP extension
ext-SimpleXML 7.1.0 The SimpleXML PHP extension
ext-soap 7.1.0 The soap PHP extension
ext-sockets 7.1.0 The sockets PHP extension
ext-SPL 7.1.0 The SPL PHP extension
ext-sqlite3 0.7-dev The sqlite3 PHP extension
ext-swoole 1.9.1 The swoole PHP extension
ext-tokenizer 7.1.0 The tokenizer PHP extension
ext-xapian 0 The xapian PHP extension (actual version: )
ext-xdebug 2.6.0beta1 The xdebug PHP extension
ext-xml 7.1.0 The xml PHP extension
ext-xmlreader 7.1.0 The xmlreader PHP extension
ext-xmlwriter 7.1.0 The xmlwriter PHP extension
ext-Zend-OPcache 7.1.0 The Zend OPcache PHP extension
ext-zip 1.13.5 The zip PHP extension
ext-zlib 7.1.0 The zlib PHP extension
lib-curl 7.47.0 The curl PHP library
lib-iconv 2.23 The iconv PHP library
lib-libxml 2.9.3 The libxml PHP library
lib-openssl 1.0.2.7 OpenSSL 1.0.2g 1 Mar 2016
lib-pcre 8.38 The pcre PHP library
php 7.1.0 The PHP interpreter
php-64bit 7.1.0 The PHP interpreter, 64bit
php-ipv6 7.1.0 The PHP interpreter, with IPv6 support


里面显示的 php 版本也是 7.1.0 跟我 PHP -V 的版本是一样的
PHP 7.1.0 (cli) (built: Nov 5 2018 16:01:57) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.1.0, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.6.0beta1, Copyright (c) 2002-2017, by Derick Rethans

昨天根据大家说的装了两个 php 把其中一个给删除了
@littleylv 不是 是报缺少扩展
@littleylv 我刚才试下了 /path/to/php(有 redis.mbstring 扩展的 php) composer create-project mix/mix --prefer-dist 还是会报错
@littleylv 查出来确实 php 跟 php -v 的不一样 那要怎么去切换 composer 的 php 版本呢
@haiyang416 执行 php composer.phar install 报错 Could not open input file: composer.phar
问下怎么检查 composer 运行的到底是那个 php,加载的是哪个 php.ini 步骤要怎么去实现
@emeab composer 使用的是“环境变量”里面的 php php -v 跟我 phpinfo 输出出来的 php 是一个版本的
关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   4246 人在线   最高记录 5043   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.3 · 16ms · UTC 02:42 · PVG 10:42 · LAX 18:42 · JFK 21:42
♥ Do have faith in what you're doing.