苍天有泪 发表于 2015-12-30 13:06:09

Mac OS下安装PEAR

  pear是PHP的扩展和应用程序库,包含了很多有用的类,安装好php5.0后,pear实际上并没有被安装,可以执行一下命令来安装
  



pear sudo cp /private/etc/php.ini.default /private/etc/php.ini
sudo php /usr/lib/php/install-pear-nozlib.phar
pear config-set php_ini /private/etc/php.ini
pecl config-set php_ini /private/etc/php.ini
sudo pear upgrade-all
  
  如果执行第二个语句的时候,遇到以下类似的提示信息,说明你的~/ 下面已经存在.pearrc文件了,可以先删除.pearrc然后在执行就可以了 Archive_Tar: upgrade to a newer version (1.3.7 is not newer than 1.3.7) Console_Getopt: upgrade to a newer version (1.3.0 is not newer than 1.3.0) Structures_Graph: upgrade to a newer version (1.0.4 is not newer than 1.0.4) XML_Util: upgrade to a newer version (1.2.1 is not newer than 1.2.1) PEAR: upgrade to a newer version (1.9.4 is not newer than 1.9.4)
页: [1]
查看完整版本: Mac OS下安装PEAR