相关疑难解决方法(0)

使用 brew 将 PHP 更新到 7.4 macOS Catalina

我尝试7.4使用 brew将我的 PHP 版本更新到macOS Catalina。

我做了 brew install php@7.4

如果我检查我的版本php -v,我仍然看到旧版本PHP 7.3.11

我需要做什么?

更新:

之后brew doctor,我得到:

警告:在您的 PATH 中找不到 Homebrew 的 sbin,但您已经安装了将可执行文件放在 /usr/local/sbin 中的公式。例如,考虑像这样设置 PATH:echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.profile

php macos homebrew php-7.4

26
推荐指数
3
解决办法
3万
查看次数

brew链接php71:无法符号链接sbin/php-fpm

我正在尝试安装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.
Run Code Online (Sandbox Code Playgroud)

我跑的时候遇到同样的错误brew link php71.如果我运行php -v,我实际上看到我目前正在运行PHP 7.1.7.

但是当我运行valet install时,我得到:

  [DomainException]
  Unable to determine linked PHP.
Run Code Online (Sandbox Code Playgroud)

我在/ usr/local中甚至没有sbin目录.

有什么建议?

php homebrew laravel laravel-valet

15
推荐指数
1
解决办法
2万
查看次数

如何在Mac OSX上轻松切换PHP版本?

我想在PHP 5.3上测试我的应用程序,直到PHP 7.0.

在哪里以及如何安装版本以及如何通过运行小脚本来切换它们?

php macos

11
推荐指数
13
解决办法
5万
查看次数

PHP 运行 artisan 命令时出现弃用问题

每当我运行 artisan 命令时,我都会遇到这个问题。

我正在使用 Valet 和 PHP 8.1。我尝试过更改 PHP 版本,但仍然遇到此问题。

当我跑步时:

jakefeeley@Jakes-MBP marketing % php artisan plugin:install vojtasvoboda.twigextensions
Run Code Online (Sandbox Code Playgroud)

返回:

PHP Deprecated:  Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jakefeeley/Sites/certhub/marketing/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1231

Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jakefeeley/Sites/certhub/marketing/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1231 …
Run Code Online (Sandbox Code Playgroud)

php composer-php octobercms

11
推荐指数
5
解决办法
9万
查看次数