在Mac Monterey上,当尝试通过pecl
安装xdebug
时,我收到以下错误:
downloading xdebug-3.2.0.tgz ...
Starting to download xdebug-3.2.0.tgz (245,775 bytes)
....................................................done: 245,775 bytes
Notice: tempnam(): file created in the system's temporary directory in System.php on line 420
PHP Notice: tempnam(): file created in the system's temporary directory in /usr/local/Cellar/php/8.1.13/share/php/pear/System.php on line 420
Notice: tempnam(): file created in the system's temporary directory in /usr/local/Cellar/php/8.1.13/share/php/pear/System.php on line 420
Notice: tempnam(): file created in the system's temporary directory in System.php on line 420
PHP Notice: tempnam(): file created in the system's temporary directory in /usr/local/Cellar/php/8.1.13/share/php/pear/System.php on line 420
Notice: tempnam(): file created in the system's temporary directory in /usr/local/Cellar/php/8.1.13/share/php/pear/System.php on line 420
ERROR: failed to mkdir /private/tmp/pear/temp/xdebug/m4
我试过在/private/tmp
中更改chmod
的权限,但没有任何区别。我已经验证了XCode命令行工具已经安装并且是最新的,我已经完全卸载了-包括卸载后手动删除目录-并通过Homebrew重新安装PHP(当前版本为v8.1.13),但我仍然无法克服这个错误。
要通过pecl安装Xdebug,我需要做些什么?
1条答案
按热度按时间wgeznvg71#
通过在PECL中设置
temp_dir
配置设置,您应该能够将临时路径设置为已知具有完全写访问权限的路径:然后确保该目录存在。