ubuntu 12.10 php55安裝過程
1. 安裝前
apt-get install gcc gcc-c++ autoconf make libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libxml2 libxml2-devel patch pcre pcre-devel ImageMagick mhash mhash-devel libmcrypt libmcrypt-devel libevent libevent-devel libxslt libxslt-devel libtool libtool-ltdl libtool-ltdl-devel bison bison-devel
2. configure
./configure --prefix=/usr/local/php55/php --with-config-file-path=/usr/local/php55/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --with-pgsql=/usr/lib/postgresql/9.1 --with-pdo-pgsql=/usr/lib/postgresql/9.1
3.出的警告
configure: WARNING: unrecognized options: --enable-discard-path, --enable-magic-quotes, --enable-safe-mode, --with-curlwrappers, --enable-fastcgi, --enable-force-cgi-redirect, --with-mime-magic
4.去除警告選項
./configure --prefix=/usr/local/php55/php --with-config-file-path=/usr/local/php55/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-pgsql=/usr/lib/postgresql/9.1 --with-pdo-pgsql=/usr/lib/postgresql/9.1
5.configure 成功之後make出現如下問題
ext/xmlrpc/libxmlrpc/.libs/encodings.o: In function `convert':
/data/soft/php-5.5.0/ext/xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open'
/data/soft/php-5.5.0/ext/xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv'
/data/soft/php-5.5.0/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'
/data/soft/php-5.5.0/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] 錯誤 1
5.1 解決第 libiconv 的 undefined
處理方法:
./configure ............
vi Makefile
找到下面這行:
EXTRA_LIBS = -lcrypt ...
在最後新增-liconv
儲存後make透過;make install透過。
6.make install 出現到問題
mkdir: cannot create directory `/usr/local/php55': Permission denied
mkdir: cannot create directory `/usr/local/php55/php': No such file or directory
mkdir: cannot create directory `/usr/local/php55/php/lib': No such file or directory
mkdir: cannot create directory `/usr/local/php55/php/lib/php': No such file or directory
mkdir: cannot create directory `/usr/local/php55/php/lib/php/extensions': No such file or directory
mkdir: cannot create directory `/usr/local/php55/php/lib/php/extensions/no-debug-non-zts-20121212': No such file or directory
make: *** [install-modules] 錯誤 1
7.
linux@linux-Rev-1-0:/data/soft/php-5.5.0$ make install
Installing shared extensions: /usr/local/php55/php/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CLI binary: /usr/local/php55/php/bin/
Installing PHP CLI man page: /usr/local/php55/php/php/man/man1/
Installing PHP FPM binary: /usr/local/php55/php/sbin/
Installing PHP FPM config: /usr/local/php55/php/etc/
Installing PHP FPM man page: /usr/local/php55/php/php/man/man8/
Installing PHP FPM status page: /usr/local/php55/php/php/fpm/
Installing PHP CGI binary: /usr/local/php55/php/bin/
Installing build environment: /usr/local/php55/php/lib/php/build/
Installing header files: /usr/local/php55/php/include/php/
Installing helper programs: /usr/local/php55/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php55/php/php/man/man1/
page: phpize.1
page: php-config.1
/data/soft/php-5.5.0/build/shtool install -c ext/phar/phar.phar /usr/local/php55/php/bin
ln -s -f /usr/local/php55/php/bin/phar.phar /usr/local/php55/php/bin/phar
Installing PDO headers: /usr/local/php55/php/include/php/ext/pdo/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/1817/viewspace-2804945/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在 Ubuntu 12.10 安裝 wxPythonUbuntuPython
- 怎樣在Ubuntu 13.04,12.10,12.04安裝Qmmp 0.7.2Ubuntu
- Ubuntu 16.04 安裝 MySQL 8.0 全過程UbuntuMySql
- 關於ubuntu安裝中過程遇到問題Ubuntu
- ubuntu透過安裝包安裝MongodbUbuntuMongoDB
- selenium安裝過程
- webpack的安裝過程Web
- 【一】TYPORA安裝過程
- 安裝wampserver的過程Server
- Tigase手動安裝過程
- RabbitMQ安裝過程詳解MQ
- 原始碼包安裝過程原始碼
- ubuntu系統安裝mysql並支援遠端連線的詳細過程UbuntuMySql
- windows7安裝redis過程WindowsRedis
- VisualStudio(Mac)安裝過程筆記Mac筆記
- Python 3安裝IPython過程分享Python
- 安裝 UbuntuUbuntu
- ubuntu安裝Ubuntu
- [IDE工具篇]windows下安裝虛擬機器和Ubuntu的詳細過程IDEWindows虛擬機Ubuntu
- 通過 PXE 自動化安裝 Ubuntu ServerUbuntuServer
- Oracle 18c rpm 安裝及解析安裝過程Oracle
- Ubuntu解除安裝和安裝Ubuntu
- 【前端該瞭解的伺服器知識】Ubuntu 16.04下安裝MySQL的過程。前端伺服器UbuntuMySql
- Ubuntu 磁碟擴容過程Ubuntu
- Visual Studio 2010詳細安裝過程
- mysql5.7.23安裝詳細過程MySql
- 使用pip安裝selenium過程筆記筆記
- nuxtjs 安裝過程中出現問題UXJS
- CentOS7下PostgreSQL安裝過程CentOSSQL
- 秒搞VirtualBox 、CentOS 的安裝過程CentOS
- android apk安裝過程原始碼解析AndroidAPK原始碼
- redhat 5.4下安裝MYSQL全過程RedhatMySql
- Linux | Ubuntu 16.04.4 透過docker安裝單機FastDFSLinuxUbuntuDockerAST
- Ubuntu 安裝 ImagickUbuntu
- ubuntu 安裝tsensorUbuntu
- ubuntu工具安裝Ubuntu
- Ubuntu安裝APMServerUbuntuServer
- ubuntu安裝dockerUbuntuDocker