由于 .make 文件中的语法错误,Valet-PHP 安装失败

mar*_*rks 5 homebrew laravel laravel-valet

我正在按照指南安装 valet-plus。不过,brew 文件中似乎有问题。运行brew install valet-php@7.4 --build-from-source安装命令时,出现以下错误:

Last 15 lines from /Users/markusreis/Library/Logs/Homebrew/valet-php@7.4/03.make:
    virtual bool operator==(const BreakIterator&) const = 0;
            ~~~~ ^
1 error generated.
make: *** [ext/intl/breakiterator/breakiterator_methods.lo] Error 1
1 error generated.
make: *** [ext/intl/breakiterator/codepointiterator_internal.lo] Error 1
In file included from /private/tmp/valet-phpA7.4-20220304-86241-1rnurk6/php-7.4.16/ext/intl/breakiterator/codepointiterator_methods.cpp:17:
/private/tmp/valet-phpA7.4-20220304-86241-1rnurk6/php-7.4.16/ext/intl/breakiterator/codepointiterator_internal.h:42:17: error: virtual function 'operator==' has a different return type ('UBool' (aka 'signed char')) than the function it overrides (which has return type 'bool')
                virtual UBool operator==(const BreakIterator& that) const;
                        ~~~~~ ^
/usr/local/Cellar/icu4c/70.1/include/unicode/brkiter.h:127:18: note: overridden virtual function is here
    virtual bool operator==(const BreakIterator&) const = 0;
            ~~~~ ^
1 error generated.
make: *** [ext/intl/breakiterator/codepointiterator_methods.lo] Error 1

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/henkrehorst/homebrew-php/issues
Run Code Online (Sandbox Code Playgroud)

我也尝试过不使用--build-from-source,但后来我得到了 SSL,而且我也找不到解决办法......

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to dl.bintray.com:443

Error: valet-php@8.0: Failed to download resource "valet-php@8.0"
Download failed: https://dl.bintray.com/henkrehorst/valet-php/valet-php%408.0-8.0.3.sierra.bottle.tar.gz
Run Code Online (Sandbox Code Playgroud)

我完全不知道该怎么办。我也尝试过8.0-7.3同样的错误。有什么建议么?

小智 4

看看这里 - https://github.com/henkrehorst/homebrew-php/issues/158#issuecomment-1059516450 它将解决您的问题。

  • 你好!请编辑您的答案以添加解决方案的摘要。有关详细信息,请参阅 https://meta.stackexchange.com/tags/link-only-answers/info。 (2认同)