简体   繁体   中英

PHPUnit can't detect PHP 7.3.2

I've successfully installed PHPUnit, but I am running into some problems. When I try to run it on the command line, I get this message:

> “PHPUnit 8.0.4 by Sebastian Bergmann and contributors. This version of

PHPUnit is supported on PHP 7.2 and PHP 7.3. You are using PHP 7.1.23 (/usr/bin/php).”

When I type “php –v” in the command line, the system verifies that I'm using version 7.1.23 of the language.

When I tried to install PHP 7.3.2, Homebrew gives me the following message:

“Warning: php 7.3.2 is already installed, it's just not linked You can use brew link php to link this version."

When I try to link, it tells me:

"Linking /usr/local/Cellar/php/7.3.2... Error: Could not symlink sbin/php-fpm /usr/local/sbin is not writable.”

So PHP 7.3.2 does exist on my system, but PHPUnit is not detecting it. Would you happen to know of any fix for this? Is there a way to switch to 7.3.2, or to perhaps install an earlier release of PHPUnit that's compatible with PHP 7.1.23?

Thanks in advance for any help you can give.

Maybe you should just try with sudo?

sudo brew link php

Edit: It's not a good idea. Please ignore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM