Problems instally pgcli from source
See original GitHub issueDescription
I was reading the tutorial, trying to installing pgcli from the source code.
During the pip installation (pip install -e .), I received the following error:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
After googling a bit, I found this StackOverflow question. I tried most of the answers (openssl and xcode were installed and updated), but this answer turns out to solve the problem.
I’m reporting this because I’m not sure this is a known problem (or if it’s a problem after all).
Your environment
- I’m using macOS, version 10.14.4
- I’m using Terminal, version 2.9.4 (421.1.1)
- Output of
pip freeze
command.
aspy.yaml==1.3.0 attrs==19.1.0 autopep8==1.3.3 behave==1.2.6 certifi==2019.6.16 cfgv==2.0.1 chardet==3.0.4 click==6.7 codecov==2.0.15 coverage==4.3.4 docutils==0.15.2 filelock==3.0.12 identify==1.4.5 idna==2.8 importlib-metadata==0.19 mock==3.0.5 nodeenv==1.3.3 packaging==19.1 parse==1.12.0 parse-type==0.5.2 pexpect==3.3 pkginfo==1.5.0.1 pluggy==0.12.0 pre-commit==1.17.0 py==1.8.0 pycodestyle==2.5.0 pyparsing==2.4.2 pytest==3.0.7 PyYAML==5.1.2 requests==2.22.0 requests-toolbelt==0.9.1 six==1.12.0 toml==0.10.0 tox==3.13.2 tqdm==4.32.2 twine==1.11.0 urllib3==1.25.3 virtualenv==16.7.2 zipp==0.5.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
@hayd We discussed switching to binary / source in a few issues:
https://github.com/dbcli/pgcli/issues/844 https://github.com/dbcli/pgcli/issues/849 https://github.com/dbcli/pgcli/issues/974 https://github.com/dbcli/pgcli/issues/1036
This is beyond me why (there’s a huge discussion here but I still think they should have kept one package and let
--binary-only
and--no-binary
flags do the work), but the psycopg2 documentation still states:Ugh, ugh and ugh. We have so many people experiencing issues with the source package. I wish we could have a way for users to choose either
psycopg2
orpsycopg2-binary
, but there’s no such way withpip
.It is possible to install and use pgcli with psycopg2-binary if you do this:
Unfortunarely, this workaround will only work if you are able to install
psycopg2
.I’m going to create a branch switching pgcli to psycopg3. Maybe this will help us leave the binary/source mess behind.
This should be solved with psycopg 2.9 (https://github.com/psycopg/psycopg2/issues/1200)