mac os x编辑安装vld及错误处理

1. 下载

http://pecl.php.net/package/vld

2. 解压后进入源码目录

3. sudo /Applications/XAMPP/xamppfiles/bin/phpize

4. sudo MACOSX_DEPLOYMENT_TARGET=10.8 CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch i386 -arch x86_64 -bind_at_load” ./configure –with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config

5. sudo make

6. sudo make install

注意:

在第四步中如果不添加一些编译参数,则会出现下面的错误:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/ extensions/no-debug-non-zts-20090626/vld.so’ – dlopen(/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/ no-debug-non-zts-20090626/vld.so, 9): no suitable image found. Did find:\n\t/Applications/XAMPP/xamppfiles/lib/ php/php-5.3.1/extensions/no-debug-non-zts-20090626/vld.so: mach-o, but wrong architecture in Unknown on line 0
2109 [Wed Jan 23 11:32:53 2013] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2. 0.4 Perl/v5.10.1 configured — resuming normal operations

发表评论

电子邮件地址不会被公开。 必填项已用*标注