krb5扩展,2重复的符号,clang: error: link命令失败,退出码为1


krb5 extension, 2 Duplicate symbols, clang: error: linker command failed with exit code 1

我正在尝试安装一个PHP扩展kerebos auth (https://pecl.php.net/package/krb5),在我的OSX上,我已经下载了扩展,现在我正在尝试安装它,但我得到了一个关于2重复的错误。我还安装了autoconfig来运行。/configure,默认情况下没有安装。

我试图遵循安装指南文件:

+ When compiling this extension as shared module:
  - run phpize in the extension directory
  - run ./configure (optionally add --with-krb5kadm if you need this functionality)
  - run make && make install
  - optional: enable your new extension in you php.ini

当我试图让&&Make install I receive this error

duplicate symbol _krb5_ce_ccache in:
    .libs/krb5.o
    .libs/negotiate_auth.o
duplicate symbol _krb5_ce_ccache in:
    .libs/krb5.o
    .libs/gssapi.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [krb5.la] Error 1

我注意到两个文件(krb5。=/所以我检查了krb5.c, negotiate_auth.c和gssapi.c(这两个文件的链接都在这里看到http://pastebin.com/zNdGzLFj)

有人知道如何解决这个问题吗?

我试着在下载文件夹中做,当时我无法做到(不知道为什么),然后我在文档中做了,它解决了。

第一个命令没有命令在安装文件中,它是由扩展作者给出的:

# This will put the current development source into the folder php_krb5
svn co https://svn.php.net/repository/pecl/krb5/trunk/ php_krb5
# Go there
cd php_krb5
# Build and install
phpize
./configure
make && make install

参数——with-krb5kadm负责标记启用MIT kerberos管理API的绑定允许您管理主体、策略等)。

要激活这个插件,我必须搜索krb5。复制这个位置然后搜索php。ini然后添加这一行到文件中:

extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/krb5.so 

您看到的位置是我的系统,您的可能不同。

测试你是否选择了正确的krb5。所以(我有3)你可以这样确认:

php -m

在这个列表中,您将看到krb5,如果您添加krb5.so.

非常感谢Moritz Bechler!!