Problem installing tunnel on Linux Mint xfce


#1

Hi,
I am trying to install tunnel on Linux Mint xfce, but I am receiving an error.
I followed the steps for Linux Mint to install pipx (sudo apt-get install python3-pip; python3 -m pip install --user pipx; python3 -m userpath append ~/.local/bin). Then continued with pipx install ldh-client but received the following error:

Summary

ERROR: Command errored out with exit status 1:
command: /home/sarah/.local/pipx/venvs/ldh-client/bin/python /home/sarah/.local/pipx/shared/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-vdn87a4u/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple – setuptools wheel pycairo
cwd: None
Complete output (56 lines):
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/d9/de/554b6310ac87c5b921bc45634b07b11394fe63bc4cb5176f5240addf18ab/setuptools-41.6.0-py2.py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Collecting pycairo
Using cached https://files.pythonhosted.org/packages/3c/1a/c0478ecab31baae50fda9956547788afbd0ca563adc52c9b03cab30f17eb/pycairo-1.18.2.tar.gz
Building wheels for collected packages: pycairo
Building wheel for pycairo (setup.py): started
Building wheel for pycairo (setup.py): finished with status β€˜error’
ERROR: Command errored out with exit status 1:
command: /home/sarah/.local/pipx/venvs/ldh-client/bin/python -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-4y0vdhx1/pycairo/setup.py’"’"’; file=’"’"’/tmp/pip-install-4y0vdhx1/pycairo/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-ee7cm6nb --python-tag cp36
cwd: /tmp/pip-install-4y0vdhx1/pycairo/
Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cairo
copying cairo/init.py -> build/lib.linux-x86_64-3.6/cairo
copying cairo/init.pyi -> build/lib.linux-x86_64-3.6/cairo
copying cairo/py.typed -> build/lib.linux-x86_64-3.6/cairo
running build_ext
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']' returned non-zero exit status 1. ---------------------------------------- ERROR: Failed building wheel for pycairo Running setup.py clean for pycairo Failed to build pycairo Installing collected packages: setuptools, wheel, pycairo Running setup.py install for pycairo: started Running setup.py install for pycairo: finished with status 'error' ERROR: Command errored out with exit status 1: command: /home/sarah/.local/pipx/venvs/ldh-client/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4y0vdhx1/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4y0vdhx1/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-iptgnodr/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-vdn87a4u/overlay --compile --install-headers /home/sarah/.local/pipx/venvs/ldh-client/include/site/python3.6/pycairo cwd: /tmp/pip-install-4y0vdhx1/pycairo/ Complete output (15 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/cairo copying cairo/__init__.py -> build/lib.linux-x86_64-3.6/cairo copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.6/cairo copying cairo/py.typed -> build/lib.linux-x86_64-3.6/cairo running build_ext Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containingcairo.pc’
to the PKG_CONFIG_PATH environment variable
No package β€˜cairo’ found
Command β€˜[β€˜pkg-config’, β€˜β€“print-errors’, β€˜β€“exists’, β€˜cairo >= 1.13.1’]’ returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/sarah/.local/pipx/venvs/ldh-client/bin/python -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-4y0vdhx1/pycairo/setup.py’"’"’; file=’"’"’/tmp/pip-install-4y0vdhx1/pycairo/setup.py’"’"’;f=getattr(tokenize, β€˜"’"β€˜open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, β€˜"’"’\n’"’"’);f.close();exec(compile(code, file, β€˜"’"β€˜exec’"’"’))’ install --record /tmp/pip-record-iptgnodr/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-vdn87a4u/overlay --compile --install-headers /home/sarah/.local/pipx/venvs/ldh-client/include/site/python3.6/pycairo Check the logs for full command output.

ERROR: Command errored out with exit status 1: /home/sarah/.local/pipx/venvs/ldh-client/bin/python /home/sarah/.local/pipx/shared/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-vdn87a4u/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple – setuptools wheel pycairo Check the logs for full command output.

β€˜/home/sarah/.local/pipx/venvs/ldh-client/bin/python -m pip install ldh-client -q’ failed

Did I miss something?

Help is much appreciated! :slight_smile:


#2

I believe you have to add setuptools to your list for what you’re installing with pip. Try that.


#3

You’re missing the cairo package (a graphics library). Not sure exactly what the package name will be, but a synaptic search for cairo should turn something up. Probably need the dev package too (something like cairo-dev or libcairo-dev).


#4

@niceguy

The following works with xfce:

run the following command to install missing dependencies:

sudo apt install libcairo2-dev libgirepository1.0-dev pip venv python3-pip python-pip gir1.2-nm-1.0 network-manager-openvpn network-manager-openvpn-gnome seahorse

Then run the command:

python3 -m pip install --user pipx python3 -m userpath append ~/.local/bin pip3 install ldh-client

Then follow the account setup steps here: https://docs.puri.sm/Librem_One/PureOS/VPN_Tunnel.html#configuring-librem-tunnel


#5

Thanks for your suggestions.

@joao.azevedo

For

sudo apt install libcairo2-dev libgirepository1.0-dev pip venv python3-pip python-pip gir1.2-nm-1.0 network-manager-openvpn network-manager-openvpn-gnome seahorse

I’m getting the following output:

Summary

sudo apt install libcairo2-dev libgirepository1.0-dev pip venv python3-pip python-pip gir1.2-nm-1.0 network-manager-openvpn network-manager-openvpn-gnome seahorse
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package pip
E: Unable to locate package venv

I repeated without pip and venv.

The command

python3 -m pip install --user pipx python3 -m userpath append ~/.local/bin pip3 install ldh-client

gave the output

Summary

no such option: -m


#6

I think you should try this as three separate commands

python3 -m pip install --user pipx 
python3 -m userpath append ~/.local/bin 
pip3 install ldh-client

#7

Yes you should, sorry for this error in the copy and past process


#8

Oh I guess I should have figured myself. Thanks for the guidance. Will try tomorrow.


#9

Now for pip3 install ldh-client I’m getting the following:

Summary

Collecting ldh-client
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/87/47/d67eecca4b24ac45fbaa6a5424a5b4b0fe1c7e22ad656bfa6b4a74e54735/ldh_client-0.0.2-py3-none-any.whl
Collecting requests>=2.21.0 (from ldh-client)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 61kB 308kB/s
Collecting click>=6.7 (from ldh-client)
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting PyGObject>=3.32.0 (from ldh-client)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/46/8a/b183f3edc812d4d28c8b671a922b5bc2863be5d38c56b3ad9155815e78dd/PyGObject-3.34.0.tar.gz (699kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 706kB 1.4MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File β€œβ€, line 1, in
ModuleNotFoundError: No module named β€˜setuptools’

----------------------------------------

Command β€œpython setup.py egg_info” failed with error code 1 in /tmp/pip-build-c9suk4py/PyGObject/

Any idea how to proceed now?


#10

Add python-setuptools after ldh-client.


#11

I tried to install Ubuntu 18.04 and got the same error. Then I figured I hadn’t installed pipx properly, which I then did with python3 -m pip install --user pipx and python3 -m pipx ensurepath. Then I stumbled upon the same problem as described in this thread, but the solution worked for me as well. Now tunnel is running properly.