2012年3月30日 星期五

ubuntu 8.04 pecl install apc fail

# pecl install apc
downloading APC-3.1.9.tgz ...
Starting to download APC-3.1.9.tgz (155,540 bytes)
.................................done: 155,540 bytes
54 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

ERROR: `phpize' failed

手動修正略過錯誤
# cd /tmp/pear/cache

# tar zxf APC-3.1.9.tgz

#  vi `which phpize`
48 phpize_check_configm4()
49 {
50   if test ! -r config.m4; then
50   if test ! -r /tmp/pear/cache/APC-3.1.9/config.m4; then
51      phpize_no_configm4 $@
52     exit 1
53   fi
54 }

再執行一次, 會 pass 上面的錯誤, 但會產生另一個錯誤
# pecl install apc 


building in /tmp/pear/temp/pear-build-root5UmrUG/APC-3.1.9
running: /tmp/pear/temp/pearzUs6mv/configure --enable-apc-debug=no --enable-apc-filehits=no --enable-apc-spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=yes --enable-apc-pthreadrwlocks=no
configure: error: cannot find sources (config.m4) in /tmp/pear/temp/pearzUs6mv or ..
ERROR: `/tmp/pear/temp/pearzUs6mv/configure --enable-apc-debug=no --enable-apc-filehits=no --enable-apc-spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=yes --enable-apc-pthreadrwlocks=no' failed

手動編譯、安裝
# cd /tmp/pear/cache/APC-3.1.9

# ./configure --enable-apc-debug=no --enable-apc-filehits=no --enable-apc-spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=yes --enable-apc-pthreadrwlocks=no

# make

# make install
Installing shared extensions:     /usr/lib/php5/20060613+lfs/
Installing header files:          /usr/include/php5/

# ls /usr/lib/php5/20060613+lfs/apc.so

# echo "extension=apc.so" >> /etc/php5/apache2/php.ini
# echo "apc.rfc1867 = on" >> /etc/php5/apache2/php.ini

# /etc/init.d/apache2 restart

沒有留言:

張貼留言