日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

php baocuo error,PHP编译报错configure: error: Cannot find libmysqlclient under /usr.

發布時間:2023/12/2 数据库 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php baocuo error,PHP编译报错configure: error: Cannot find libmysqlclient under /usr. 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

今天編譯PHP的時候遇到了幾個錯誤,記錄一下

第一次編譯的時候報錯如下:

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

報這個錯是因為沒有安裝libmcrypt這個包,下載地址如下:

wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz

安裝:

[root@localhost app]# tar zxfv libmcrypt-2.5.7.tar.gz

[root@localhost app]# cd libmcrypt-2.5.7

[root@localhost app]# ./configure

[root@localhost app]# make ; make install

重新編譯php

[root@localhost app]# cd php-5.3.28

[root@localhost php-5.3.28]# ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql-sock=/var/lib/mysql/mysql.sock --with-gd --with-iconv ?--with-zlib ?--enable-xml --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex ?--enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl

第二次編譯報錯如下:

configure: error: Cannot find libmysqlclient under /usr.

Note that the MySQL client library is not bundled anymore!

這個錯誤時因為在64位的linux系統中,libmysqlclient 默認安裝到了 /usr/lib64/mysql/ 目錄下,但是php編譯時,要去/usr/lib目錄下查找

解決辦法:在/usr/lib目錄下創建一個軟連接

[root@localhost php-5.3.28]# ls /usr/lib64/mysql/libmysqlclient*

/usr/lib64/mysql/libmysqlclient_r.so ? ? /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 ?/usr/lib64/mysql/libmysqlclient.so.16

/usr/lib64/mysql/libmysqlclient_r.so.16 ?/usr/lib64/mysql/libmysqlclient.so ? ? ? ? ? /usr/lib64/mysql/libmysqlclient.so.16.0.0

[root@localhost php-5.3.28]# ln -s /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib/libmysqlclient.so

最后編譯成功:

+--------------------------------------------------------------------+

| License: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |

| This software is subject to the PHP License, available in this ? ? |

| distribution in the file LICENSE. ?By continuing this installation |

| process, you are bound by the terms of this license agreement. ? ? |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point. ? ? ? ? ? ? ? ? ? ? ? ? ? ?|

+--------------------------------------------------------------------+

Thank you for using PHP.

來自 “ ITPUB博客 ” ,鏈接:http://blog.itpub.net/23249684/viewspace-1242858/,如需轉載,請注明出處,否則將追究法律責任。

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的php baocuo error,PHP编译报错configure: error: Cannot find libmysqlclient under /usr.的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。