当我尝试执行此命令时:
sudo openvpn --show-pkcs11-ids /usr/lib/libeTPkcs11.so
我收到错误:
Options error: Unrecognized option or missing parameter(s) in [CMD-LINE]:1: show-pkcs11-ids (2.3.2)
Use --help for more information.
这什么也没显示:
openvpn --help | grep show-pkcs11-ids
which openvpn
/usr/local/sbin/openvpn
openvpn --version
OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Jun 5 2016
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <[email protected]>
Compile time defines: enable_crypto=yes enable_debug=yes enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_eurephia=yes enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=no enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no
我在 Ubuntu 14.04 x64 上并且构建openvpn
为:
sudo apt-get install libpkcs11-helper1-dev
sudo apt-get build-dep openvpn
apt-get source openvpn
cd openvpn-2*
sudo ./configure
sudo make && sudo make install
那么问题是什么?
我第二次尝试是通过安装它apt-get install
我这样做了sudo make uninstall
,但似乎出了点问题:
openvpn
bash: /usr/local/sbin/openvpn: No such file or directory
sudo apt-get install openvpn
没有帮助输出是相同的
openvpn
bash: /usr/local/sbin/openvpn: No such file or directory
看来openvpn
命令与旧的二进制文件有关,如何修复它?
重新启动计算机后,它似乎可以工作:
which openvpn
/usr/sbin/openvpn
但仍然有错误:
sudo openvpn --show-pkcs11-ids /usr/lib/libeTPkcs11.so
Sun Jun 5 02:16:24 2016 PKCS#11: Cannot add provider '/usr/lib/libeTPkcs11.so' 6-'CKR_FUNCTION_FAILED'
Sun Jun 5 02:16:24 2016 Exiting due to fatal error
顺便说一句,我可以通过执行与第一个命令类似的操作pkcs11-tool --module /usr/lib64/libeTPkcs11.so -L
。
答案1
您应该告诉 configure 您想要启用 pkcs11:
./configure --enable-pkcs11
另外,您不应该使用 sudo 来运行./configure
。make
只make install
需要 sudo。