红色为错误。黄色为错误提示。黑色为正确。
1.下载peal
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
出错:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://pear.php.net/go-pear.phar">here</a>.</p>
</body></html>
然后执行:
1.1下载:curl -O https://pear.php.net/go-pear.phar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3523k 100 3523k 0 0 159k 0 0:00:22 0:00:22 --:--:-- 246k
1.2安装:sudo php -d detect_unicode=0 go-pear.phar
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin<

在Mac上安装pear时遇到了301 Moved Permanently的错误,通过curl重新下载并配置安装路径,成功安装并更新了php.ini的include_path。最后检查了PEAR版本。
最低0.47元/天 解锁文章
954

被折叠的 条评论
为什么被折叠?



