ubuntu下編譯安裝mysql記錄

來源:互聯網
上載者:User

標籤:

     搞了整整一天,好不容易折騰完,在此記錄下,下次就省事了。
     去官網http://www.php.net/downloads.php下載所需要的php版本,這裡我選擇5.6.22。
     下載:
    wget http://cn2.php.net/distributions/php-5.6.22.tar.gz
     解壓:
    tar -zxvf  php-5.6.22.tar.gz && cd php-5.6.22
    configure指令碼:
     /configure  --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-gd --with-openssl --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-sockets --with-apxs2=/usr/bin/apxs2 --with-mcrypt --with-curl --with-mhash --with-bz2 --enable-ftp --enable-shared --enable-shmop --enable-sysvsem --enable-bcmath --enable-fpm --enable-maintainer-zts --enable-gd-native-ttf --with-mysql=/usr --with-config-file-path=/etc/php5/apache2 --with-config-file-scan-dir=/etc/php5/conf.d --with-openssl=/usr
    編譯安裝:
   make && make install
   
   期間如果遇到錯誤:
   出現得錯誤如下:

錯誤一:
configure: error: xml2-config not found. Please check your libxml2 installation.
而我已經安裝過了libxml2,但是還是有這個提示:
解決辦法:
# sudo apt-get install libxml2-dev

錯誤二:
configure: error: Please reinstall the BZip2 distribution
而我也已經安裝了bzip2,網上找到得解決方案都是需要安裝bzip2-dev,可是11.10裡面沒有這個庫。
解決辦法:在網上找到bzip2-1.0.5.tar.gz,解壓,直接make ,sudo make install.(我使用的該源來自於http://ishare.iask.sina.com.cn/f/9769001.html)

錯誤三:
configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
解決辦法:
# sudo apt-get install libcurl4-gnutls-dev

錯誤四:
configure: error: jpeglib.h not found.
解決辦法:
# sudo apt-get install libjpeg-dev

錯誤五:
configure: error: png.h not found.
解決辦法:
# sudo apt-get install libpng-dev

錯誤六:
configure: error: libXpm.(a|so) not found.
解決辦法:
# sudo apt-get install libxpm-dev

錯誤七:
configure: error: freetype.h not found.
解決辦法:
# sudo apt-get install libfreetype6-dev

錯誤八:
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.
解決辦法:
# sudo apt-get install libt1-dev

錯誤九:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解決辦法:
# sudo apt-get install libmcrypt-dev

錯誤十:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
解決辦法:
# sudo apt-get install libmysql++-dev

錯誤十一:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解決辦法:

# sudo apt-get install libxslt1-dev 

ubuntu下編譯安裝mysql記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.