我使用的是 ubuntu 12.04。系统需要php5.2
和mysql5.1
。我从源代码安装了 php 和 mysql。配置 php 时遇到以下问题:
./configure \
--prefix=/usr/share/php52 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-mbstring \
--with-curl \
--with-mysql \
--enable-embedded-mysqli \
--enable-exif \
--with-mcrypt
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /tmp/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
我应该怎么办?
提前致谢
答案1
来自上述链接:
“apt-cache search mysql | grep dev” 显示您需要 libmysqlclient15-dev。
答案2
无需从源代码安装。您只需通过终端安装taskel,sudo apt-get install tasksel
然后运行sudo tasksel
并选择安装LAMP的选项。LAMP代表Linux、Apache、MySQL和php。请参阅https://help.ubuntu.com/community/Tasksel