pycurl icon indicating copy to clipboard operation
pycurl copied to clipboard

Unable to install using pip on Debian GNU/Linux jessie/sid

Open bananos opened this issue 9 years ago • 1 comments

While trying to install pycurl2 using pip install:

root@5711ba02e58a:/opt/src# pip install pycurl2
Downloading/unpacking pycurl2
  Downloading pycurl2-7.20.0.tar.gz (133kB): 133kB downloaded
  Running setup.py (path:/tmp/pip_build_root/pycurl2/setup.py) egg_info for package pycurl2
    Using curl-config (libcurl 7.38.0)

    Using curl directory: None

    warning: no files found matching '*.txt'
    warning: no files found matching '*.md'
    warning: no files found matching '*.md' under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'old_tests'
    warning: no files found matching '*.pyo' under directory 'old_tests'
Installing collected packages: pycurl2
  Running setup.py install for pycurl2
    Using curl-config (libcurl 7.38.0)

    Using curl directory: None
    building 'pycurl2' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/local/include/python2.7 -c src/pycurl.c -o build/temp.linux-x86_64-2.7/src/pycurl.o
    src/pycurl.c: In function ‘multi_socket_callback’:
    src/pycurl.c:2408:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
         int ret;
             ^
    gcc -pthread -shared build/temp.linux-x86_64-2.7/src/pycurl.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/mit-krb5 -lcurl -lidn -lrtmp -lssh2 -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -llber -llber -lldap -lz -o build/lib.linux-x86_64-2.7/pycurl2.so /usr/lib/x86_64-linux-gnu/libcurl.a -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-z,relro
    /usr/bin/ld: cannot find -lrtmp
    /usr/bin/ld: cannot find -lssh2
    /usr/bin/ld: cannot find -llber
    /usr/bin/ld: cannot find -llber
    /usr/bin/ld: cannot find -lldap
    collect2: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/local/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycurl2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zqyO2F-record/install-record.txt --single-version-externally-managed --compile:
    Using curl-config (libcurl 7.38.0)



Using curl directory: None

running install

running build

running build_ext

building 'pycurl2' extension

creating build

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/local/include/python2.7 -c src/pycurl.c -o build/temp.linux-x86_64-2.7/src/pycurl.o

src/pycurl.c: In function ‘multi_socket_callback’:

src/pycurl.c:2408:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

     int ret;

         ^

creating build/lib.linux-x86_64-2.7

gcc -pthread -shared build/temp.linux-x86_64-2.7/src/pycurl.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/mit-krb5 -lcurl -lidn -lrtmp -lssh2 -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -llber -llber -lldap -lz -o build/lib.linux-x86_64-2.7/pycurl2.so /usr/lib/x86_64-linux-gnu/libcurl.a -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-z,relro

/usr/bin/ld: cannot find -lrtmp

/usr/bin/ld: cannot find -lssh2

/usr/bin/ld: cannot find -llber

/usr/bin/ld: cannot find -llber

/usr/bin/ld: cannot find -lldap

collect2: error: ld returned 1 exit status

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/local/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycurl2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zqyO2F-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pycurl2
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 30: ordinal not in range(128)

Tried to install missing libraries like libidn, libldap (which the linker complains about), but no luck. The only installation method that works is the following:

git clone https://github.com/Lispython/pycurl.git
cd pycurl
python setup.py install

bananos avatar Feb 27 '15 10:02 bananos

+1

abramovtv avatar Feb 02 '17 15:02 abramovtv