我必须安装一个具有 krb5(npm package) 作为依赖项的项目,但是当“npm install”时,我收到了这个错误,
./src/krb5_bind.cc:635:13: error: no matching function for call to 'krb5_get_init_creds_password'
err = krb5_get_init_creds_password(krb_context,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/krb5/krb5.h:2302:1: note: candidate function not viable: 4th
argument ('const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *'
(aka 'const char *')) would lose const qualifier
krb5_get_init_creds_password
^
../src/krb5_bind.cc:699:13: warning: 'krb5_init_context' is deprecated: use GSS.framework [-Wdeprecated-declarations]
err = krb5_init_context(&context);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/krb5/krb5.h:1434:19: note: 'krb5_init_context' has been
explicitly marked deprecated here
(krb5_context *) KERBEROS_APPLE_DEPRECATED("use GSS.framework") __API_DEPRECATED("Use GSS.framework", macos(10.0...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/krb5/krb5.h:73:53: note: expanded from macro
'KERBEROS_APPLE_DEPRECATED'
#define KERBEROS_APPLE_DEPRECATED(x) __attribute__((deprecated(x)))
^
../src/krb5_bind.cc:750:13: warning: 'krb5_kt_resolve' is deprecated: use GSS.framework [-Wdeprecated-declarations]
err = krb5_kt_resolve(krb_context, kt_name.c_str(), &ktid);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/krb5/krb5.h:1682:19: note: 'krb5_kt_resolve' has been explicitly
marked deprecated here
krb5_keytab * ) KERBEROS_APPLE_DEPRECATED("use GSS.framework") __API_DEPRECATED("Use GSS.framework", maco...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/krb5/krb5.h:73:53: note: expanded from macro
'KERBEROS_APPLE_DEPRECATED'
#define KERBEROS_APPLE_DEPRECATED(x) __attribute__((deprecated(x)))
^
../src/krb5_bind.cc:815:13: error: no matching function for call to 'krb5_get_init_creds_keytab'
err = krb5_get_init_creds_keytab(krb_context,
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/krb5/krb5.h:2314:1: note: candidate function not viable: 6th
argument ('const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *'
(aka 'const char *')) would lose const qualifier
krb5_get_init_creds_keytab
^
17 warnings and 2 errors generated.
我在 mac os 上运行,我怀疑它使用的是 Mac OS 中的 Kerberos,而不是从 krb5 依赖项中获取它。