Skip to content

Instantly share code, notes, and snippets.

@stefankoegl
Created May 11, 2015 19:06
Show Gist options
  • Save stefankoegl/cfd6be00dc25a1627326 to your computer and use it in GitHub Desktop.
Save stefankoegl/cfd6be00dc25a1627326 to your computer and use it in GitHub Desktop.
psycopg2cffi errors
$ python
Python 3.4.3 (default, Mar 26 2015, 22:03:40)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from psycopg2cffi import compat
Traceback (most recent call last):
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/cffi/vengine_cpy.py", line 150, in load_library
self.verifier.modulefilename)
ImportError: /home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/_impl/__pycache__/_cffi__x78541fd6xba1dd32f.cpython-34m-x86_64-linux-gnu.so: undefined symbol: PQfmod
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/__init__.py", line 4, in <module>
from psycopg2cffi import extensions
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/extensions.py", line 39, in <module>
from psycopg2cffi._impl import connection as _connection
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/_impl/connection.py", line 10, in <module>
from psycopg2cffi._impl import exceptions
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/_impl/exceptions.py", line 12, in <module>
from psycopg2cffi._impl.libpq import libpq, ffi
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/_impl/libpq.py", line 257, in <module>
ext_package='psycopg2cffi')
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/cffi/api.py", line 367, in verify
lib = self.verifier.load_library()
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/cffi/verifier.py", line 97, in load_library
return self._load_library()
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/cffi/verifier.py", line 207, in _load_library
return self._vengine.load_library()
File "/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/cffi/vengine_cpy.py", line 153, in load_library
raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/_impl/__pycache__/_cffi__x78541fd6xba1dd32f.cpython-34m-x86_64-linux-gnu.so': /home/stefan/mygpo/mygpo-auth/venv/lib/python3.4/site-packages/psycopg2cffi/_impl/__pycache__/_cffi__x78541fd6xba1dd32f.cpython-34m-x86_64-linux-gnu.so: undefined symbol: PQfmod
>>>
Downloading/unpacking cffi<1.0 (from psycopg2cffi==2.6.1->-r requirements.txt (line 5))
Downloading cffi-0.9.2.tar.gz (209kB): 209kB downloaded
Running setup.py (path:/tmp/pip-build-3xccx9f1/cffi/setup.py) egg_info for package cffi
Downloading/unpacking pycparser (from cffi<1.0->psycopg2cffi==2.6.1->-r requirements.txt (line 5))
Downloading pycparser-2.12.tar.gz (297kB): 297kB downloaded
Running setup.py (path:/tmp/pip-build-3xccx9f1/pycparser/setup.py) egg_info for package pycparser
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
Installing collected packages: psycopg2cffi, cffi, pycparser
Running setup.py install for psycopg2cffi
================================================================================
Unable to find the libpq for your platform in:
-> /usr/lib/x86_64-linux-gnu
Ignoring pg_config, trying ctypes.util.find_library()
-> OK (libpq.so.5)
================================================================================
Running setup.py install for cffi
building '_cffi_backend' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -I/usr/include/python3.4m -I/home/stefan/mygpo/mygpo-auth/venv/include/python3.4m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.4/c/_cffi_backend.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/c/_cffi_backend.o -lffi -o build/lib.linux-x86_64-3.4/_cffi_backend.cpython-34m.so
Running setup.py install for pycparser
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
Build the lexing/parsing tables
Successfully installed psycopg2cffi cffi pycparser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment