我正在尝试使用homebrew在我的Mac上安装mcrypt和intl,但公式是无效的,因为homebrew/php已被弃用并合并到homebrew/core中。
我已经安装了php的最新版本(brew install php),似乎mcrypt和intl没有包含在模块中。有人解决这个问题了吗?
操作系统: Mac Os High Sierra
在CentOS 7上,我安装了PHP7.1。
然后我为composer安装了:
cd /tmp
curl -sS https://getcomposer.org/installer | php71 --> used php71 instead of php, php didn't work
mv composer.phar /usr/local/bin/composer
然后,当使用composer时,我得到:
/usr/bin/env: php: No such file or directory
当使用sudo composer时,我得到:
sudo: compose
我刚刚用Homebrew安装了PHP7.1,当我键入终端$ sudo apachectl restart时,它会返回这个消息,AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.3.1.156. Set the 'ServerName' directive globally to suppress this message,但是一切看起来都很好。
phpinfo();返回正常结果..。
php artisan serve返回不同的U
我正在尝试安装Laravel Valet,它需要php 7.1,但是当我运行brew install php71时,我得到以下错误:
==> Pouring php71-7.1.10_21.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink sbin/php-fpm
/usr/local/sbin is not writable
我运行的是valet 2.0.5,它使用了错误的PHP版本。当启动贴身服务时,我会得到
$ valet start
Restarting php71...
Restarting nginx...
Valet services have been started.
但是phpinfo()给了PHP Version 5.6.30和Loaded Configuration File: /usr/local/etc/php/5.6/php.ini。
我已经使用brew安装并重新链接了php,
$ which php
/usr/local/opt/php71/bin/php
$ php -v
PHP