在 Ubuntu 11 上安装支持 IMAP/Kerberos 的 PHP 时出现问题
我正在尝试在 Ubuntu 11.04 上安装 PHP。我正在从源代码编译。
这是我安装依赖项的情况:
apt-get -y install php5-dev php-pear
apt-get -y install libxml2-dev libevent-dev zlib1g-dev libbz2-dev libgmp3-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libgd2-xpm-dev libmcrypt-dev memcached libmemcached-dev libc-client-dev libkrb5-dev
这是我的配置脚本:
./configure --enable-fpm --enable-cli --with-fpm-user=php-fpm --with-fpm-group=php-fpm --prefix=/usr/local/php --exec-prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/etc --enable-bcmath --enable-ctype --with-curl --with-curlwrappers --enable-dba --with-cdb --with-flatfile --with-inifile --enable-exif --enable-ftp --disable-fileinfo --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-gmp --with-imap --with-imap-ssl --with-ldap --with-ldap-sasl --enable-mbstring=all --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-pdo-mysql --with-openssl --with-kerberos --with-pspell --enable-shmop --enable-simplexml --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --enable-xmlreader --with-xmlrpc --with-xsl --with-zip --with-zlib --enable-sysvsem --enable-sysvshm
但是,我收到错误:
configure: error: Kerberos libraries not found.
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
我没有提供路径,但我的系统上没有像 /usr/kerberos 这样的目录。错误上方大约五行有一个日志条目,内容为checking for IMAP Kerberos support... yes
。
我是否需要为 --with-kerberos
指定一个目录,这个目录到底是什么?我一整天都在思考这个问题,似乎无法弄清楚。
提前致谢。
编辑:
我能够通过符号链接解决这个问题。
以下是运行配置命令之前您要做的事情。
mkdir /usr/kerberos
ln -s /usr/lib/x86_64-linux-gnu /usr/kerberos/lib
干杯。
I'm trying to install PHP on Ubuntu 11.04. I'm compiling from source.
Here is me installing dependencies:
apt-get -y install php5-dev php-pear
apt-get -y install libxml2-dev libevent-dev zlib1g-dev libbz2-dev libgmp3-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libgd2-xpm-dev libmcrypt-dev memcached libmemcached-dev libc-client-dev libkrb5-dev
And here is my configure script:
./configure --enable-fpm --enable-cli --with-fpm-user=php-fpm --with-fpm-group=php-fpm --prefix=/usr/local/php --exec-prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/etc --enable-bcmath --enable-ctype --with-curl --with-curlwrappers --enable-dba --with-cdb --with-flatfile --with-inifile --enable-exif --enable-ftp --disable-fileinfo --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-gmp --with-imap --with-imap-ssl --with-ldap --with-ldap-sasl --enable-mbstring=all --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-pdo-mysql --with-openssl --with-kerberos --with-pspell --enable-shmop --enable-simplexml --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --enable-xmlreader --with-xmlrpc --with-xsl --with-zip --with-zlib --enable-sysvsem --enable-sysvshm
However, I get an error:
configure: error: Kerberos libraries not found.
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
I didn't provide a path, but there's no directory like /usr/kerberos on my system. About five lines above the error there is a log entry that says checking for IMAP Kerberos support... yes
.
Do I need to specify a directory for --with-kerberos
and what would this directory be exactly? I've been on this all day, and can't seem to figure it out.
Thanks in advance.
EDIT:
I was able to sort this issue out with a symbolic link.
Below is the what you do before you run the configure command.
mkdir /usr/kerberos
ln -s /usr/lib/x86_64-linux-gnu /usr/kerberos/lib
Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我正在处理在 Ubuntu 11.04 上从源代码安装 PHP 5.3.8 的问题。我正在使用:
并且遇到了相同的错误:
检查给定的路径 --with-kerberos (如果没有给出路径,则在 /usr/kerberos、/usr/local 和 /usr 中搜索)
我意识到我的 kerberos 安装文件位于非常不同的 /usr/lib/x86_64-linux-gnu 中。我尝试了建议的“--with-kerberos=/usr/lib/x86_64-linux-gnu”,但正如链接页面之一所示,搜索会自动将“lib”添加到提供的路径的末尾。
如前所述,链接到此处的其他页面之一讨论了脚本自动将“lib”添加到路径中(因此,在不指定路径的情况下,它会查找 /usr/kerberos/lib、/usr/local/lib 和 /usr /lib) 但我没有意识到的是,如果您使用“--with-libdir=lib64”,这会导致脚本实际上寻找 /usr/kerberos/lib64、/usr/local/lib64、 /usr/lib64)。
意识到这一点后,我刚刚创建了以下符号链接并在不指定 kerberos 路径的情况下再次尝试。
这对我有用。希望它对其他人有帮助。
I was dealing with this issue installing PHP 5.3.8 from source on Ubuntu 11.04. I was using:
and was getting the same error:
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
I realized that my kerberos installation files were in the very different /usr/lib/x86_64-linux-gnu. I tried the suggested "--with-kerberos=/usr/lib/x86_64-linux-gnu" but as one of the linked pages suggests, the search automatically adds "lib" to the end of the provided path.
As mentioned, one of the other pages linked to here discusses that the script automatically adds "lib" onto the paths (so without specifying a path, it looks in /usr/kerberos/lib, /usr/local/lib, and /usr/lib) but what I failed to realize is that if you're using "--with-libdir=lib64" this results in the script actually looking for /usr/kerberos/lib64, /usr/local/lib64, /usr/lib64).
Upon realizing this, I just created the following symlinks and tried again without specifying a kerberos path.
This worked for me. Hopefully it helps someone else.
由于我在 10.04 中也遇到了此错误,因此我决定也粘贴我的解决方案。也许有一天它可以帮助某人。在 lucid 上运行编译时,我从
--with-kerberos
更改为with-kerberos=shared,/usr/lib
。看起来这就是这里的全部魔力,因为编译器运行 lib64 时错过了那个。As i had this error with 10.04 as well, I decided to paste my solution as well. Maybe it can help someone someday. Running the compilation on lucid I changed from
--with-kerberos
towith-kerberos=shared,/usr/lib
. Looks like this was all the magic here as the compiler ran through lib64 missing out on that one.您是否尝试过谷歌搜索您的错误消息? 此页面似乎有一个解决您的问题的可行方案。
" 我检查了我的系统,发现 Kerberos 库安装在
/usr/lib64
中。因此我将–with-kerberos=/usr/lib64
传递给配置脚本,但脚本仍然报告无法找到 Kerberos 库“”从填充我终端的输出页面中,我发现配置脚本将 “lib” 附加到
中。 –with-kerberos
我提供的路径,所以它正在查找不存在的“/usr/lib64/lib”目录,但是,我发现我可以将“lib”更改为“lib64”<。 /strong> 通过将–with-libdir=lib64
传递给配置脚本。Did you try Googling your error message? This page seems to have a viable solution to your problem.
" I checked my system, and found that the Kerberos libraries were installed in
/usr/lib64
. So I passed–with-kerberos=/usr/lib64
to the configure script, but the script still reported that the Kerberos libraries could not be found. "" From the pages of output that filled my terminal, I found that the configure script was appending “lib” to the
–with-kerberos
path that I provided, so it was looking inside a non-existent “/usr/lib64/lib” directory. However, I found that I could change “lib” to “lib64″ by passing–with-libdir=lib64
to the configure script. "