Php

安裝 kadm5 php 擴展

  • January 15, 2018

系統是:

  • openSUSE Leap 42.2
  • php 5.5.14-77.3.1

我想為 php5 安裝 kadm5 擴展,但到目前為止還沒有這樣做。

正如https://codex.wordpress.org/User:Hakre/HowTo_PECL_on_Opensuse建議我嘗試過的那樣:

pecl install kadm5-alpha

拋出:

downloading kadm5-0.2.3.tar ...
Starting to download kadm5-0.2.3.tar (105,984 bytes)
........done: 105,984 bytes
13 source files, building
running: phpize
Connot find config.m4.
Make sure you run '/usr/bin/phpize' in the top level source directory of the module

ERROR: `phpize' failed

我還手動下載了文件並按照http://php.net/manual/en/install.pecl.phpize.php解釋的方式進行了嘗試,結果 phpize 工作得很好但後來

./configure

拋出:

configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib64/php5/extensions
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for kadm5 support... yes, shared
checking for kadm5 files in default path... not found
configure: error: Please reinstall the kadm5 distribution

所以問題是如何安裝 kadm5?

在此先感謝 G4

解決了這個問題。krb5-devel 包提供了建構 kadm5 擴展所需的 admin.h 標頭檔。

引用自:https://serverfault.com/questions/891937