New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

树莓派安装客户端后运行出错 #946

Open
lcyrax opened this Issue Sep 6, 2017 · 5 comments

Comments

Projects
None yet
5 participants
@lcyrax

lcyrax commented Sep 6, 2017

2017-09-06 09:13:53 INFO loading libcrypto from libcrypto.so.1.1
Traceback (most recent call last):
File "/usr/local/bin/sslocal", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/local.py", line 39, in main
config = shell.get_config(True)
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/shell.py", line 262, in get_config
check_config(config, is_local)
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/shell.py", line 124, in check_config
encrypt.try_cipher(config['password'], config['method'])
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/encrypt.py", line 44, in try_cipher
Encryptor(key, method)
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/encrypt.py", line 83, in init
random_string(self._method_info[1]))
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/encrypt.py", line 109, in get_cipher
return m[2](method, key, iv, op)
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/crypto/openssl.py", line 76, in init
load_openssl()
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/crypto/openssl.py", line 52, in load_openssl
libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,)
File "/usr/lib/python2.7/ctypes/init.py", line 375, in getattr
func = self.getitem(name)
File "/usr/lib/python2.7/ctypes/init.py", line 380, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1: undefined symbol: EVP_CIPHER_CTX_cleanup

@celeron533

This comment has been minimized.

Show comment
Hide comment
@celeron533

celeron533 Sep 6, 2017

缺少openssl

celeron533 commented Sep 6, 2017

缺少openssl

@Mr-indescribable

This comment has been minimized.

Show comment
Hide comment
@Mr-indescribable

Mr-indescribable Sep 6, 2017

master上的代码是这样写的

    try:
        libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,)
        ctx_cleanup = libcrypto.EVP_CIPHER_CTX_cleanup
    except AttributeError:
        libcrypto.EVP_CIPHER_CTX_reset.argtypes = (c_void_p,)
        ctx_cleanup = libcrypto.EVP_CIPHER_CTX_reset

EVP_CIPHER_CTX_cleanup是libcrypto1.0的。
libcrypto1.1没这个函数所以会触发AttributeError,然后异常被except捕获之后使用EVP_CIPHER_CTX_reset来代替,也就是说,这个AttributeError不应该抛出来才对。

楼主用的是什么版本的ss?

Mr-indescribable commented Sep 6, 2017

master上的代码是这样写的

    try:
        libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,)
        ctx_cleanup = libcrypto.EVP_CIPHER_CTX_cleanup
    except AttributeError:
        libcrypto.EVP_CIPHER_CTX_reset.argtypes = (c_void_p,)
        ctx_cleanup = libcrypto.EVP_CIPHER_CTX_reset

EVP_CIPHER_CTX_cleanup是libcrypto1.0的。
libcrypto1.1没这个函数所以会触发AttributeError,然后异常被except捕获之后使用EVP_CIPHER_CTX_reset来代替,也就是说,这个AttributeError不应该抛出来才对。

楼主用的是什么版本的ss?

@successgdc

This comment has been minimized.

Show comment
Hide comment
@successgdc

successgdc Sep 11, 2017

@lcyrax 你好。/usr/local/lib/python2.7/dist-packages/shadowsocks/crypto/openssl.py 请你将此文件中的52行和111行中的cleanup更新为reset后,再尝试启动。这是由于openssl库更新导致名称变更的问题(参见:openssl官网介绍)。如有疑问,欢迎提出。

successgdc commented Sep 11, 2017

@lcyrax 你好。/usr/local/lib/python2.7/dist-packages/shadowsocks/crypto/openssl.py 请你将此文件中的52行和111行中的cleanup更新为reset后,再尝试启动。这是由于openssl库更新导致名称变更的问题(参见:openssl官网介绍)。如有疑问,欢迎提出。

yrzr pushed a commit to yrzr/shadowsocks-armhf that referenced this issue Jul 6, 2018

@mrdulin

This comment has been minimized.

Show comment
Hide comment
@mrdulin

mrdulin Oct 8, 2018

@successgdc 这样改了以后是可以工作,但是不太好,ss需要增加一下兼容性了

mrdulin commented Oct 8, 2018

@successgdc 这样改了以后是可以工作,但是不太好,ss需要增加一下兼容性了

@successgdc

This comment has been minimized.

Show comment
Hide comment
@successgdc

successgdc Oct 8, 2018

@mrdulin 嗯,这是目前的解决方案。

successgdc commented Oct 8, 2018

@mrdulin 嗯,这是目前的解决方案。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment