ParallelSSH / ssh2-python

Python bindings for libssh2 C library.
https://parallel-ssh.org
GNU Lesser General Public License v2.1
229 stars 73 forks source link

Can not get it to run (ImportError: undefined symbol: libssh2_channel_request_auth_agent) #36

Closed Appa4477 closed 6 years ago

Appa4477 commented 6 years ago

Distributor ID: LinuxMint Description: Linux Mint 19 Tara Release: 19 Codename: tara In a VM

python version: 2.7.15~rc1-1 libssh2-1: 1.8.0-1

I have reinstalled libssh2 tried different versions, just about everything I have ever done before to problem solve. Nothing seems to work

Just trying to run the import causes the error aswell

command producing error:

python perf_test_ssh2.py

Error: python perf_test_ssh2.py Traceback (most recent call last): File "perf_test_ssh2.py", line 11, in from ssh2.session import Session File "ssh2/channel.pxd", line 24, in init ssh2.session ImportError: /home/(MY_USER)/.local/lib/python2.7/site-packages/ssh2/channel.so: undefined symbol: libssh2_channel_request_auth_agent

pkittenis commented 6 years ago

Hi there,

Thanks for the interest and report.

See building from source instructions here, or use one of the pre-built binary wheels. The embedded libssh2 sources need to be used, or see the dockerfiles for how to disable agent forwarding integration.

Appa4477 commented 6 years ago

After lots of problem solving and installing about 3gb of libs i had to uninstall the libssh2-1 and libssh2-1-dev and from there i was able to build libssh2 from src and able to use the module.

(Anyone using ubuntu the following commands did the trick)

I will come back and revise after I replicate with a clean install

apt purge libssh2-1 libssh2-1-dev -y; apt autoremove -y git clone --recurse-submodules https://github.com/ParallelSSH/parallel-ssh.git cd parallelssh sudo ./ci/install-ssh2.sh python setup.py build_ext -I /usr/local/include -R /usr/local/lib/x86_64-linux-gnu -L /usr/local/lib/x86_64-linux-gnu python setup.py install

pkittenis commented 6 years ago

Thanks for the info.

Those steps are also documented at build from source - suggestions welcome. See #37 for automating these steps.