I am on Kubuntu 18.10 with python 2.7.15 and 3.6.7 installed and output of lsb_release -a
is
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
pip
works on my machine since its for python 2.7 and output of pip -V
is
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
But typing pip3 gives segfault. The output is just Segmentation fault
. Same output for pipenv. I have tried removing and installing python3-pip several times, deleted pip cache in /home/<username>/.cache
. When i try to add any PPA using apt-add, i get this output
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 380, in get_ppa_info
ret = get_ppa_info_from_lp(user, ppa)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 110, in get_ppa_info_from_lp
return get_info_from_lp(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 104, in get_info_from_lp
return get_info_from_https(lp_url, True)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 96, in get_info_from_https
data = func(lp_url=url, accept_json=accept_json, retry_delays=retry_delays)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 139, in _get_https_content_py3
cafile=LAUNCHPAD_PPA_CERT)
File "/usr/lib/python3.6/urllib/request.py", line 210, in urlopen
raise ValueError('SSL support not available')
ValueError: SSL support not available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 136, in <module>
shortcut = shortcut_handler(line)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 1020, in shortcut_handler
ret = factory(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 469, in shortcut_handler
return PPAShortcutHandler(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 426, in __init__
info = get_ppa_info(self.shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 392, in get_ppa_info
_get_suggested_ppa_message(user, ppa))
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 349, in _get_suggested_ppa_message
lp_user = get_info_from_lp(LAUNCHPAD_USER_API % user)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 104, in get_info_from_lp
return get_info_from_https(lp_url, True)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 96, in get_info_from_https
data = func(lp_url=url, accept_json=accept_json, retry_delays=retry_delays)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 139, in _get_https_content_py3
cafile=LAUNCHPAD_PPA_CERT)
File "/usr/lib/python3.6/urllib/request.py", line 210, in urlopen
raise ValueError('SSL support not available')
ValueError: SSL support not available
Another symptom why i think there is an issue with ssl is that when i import ssl
in python2 terminal, it works. But importing ssl in python 3.6 gives segfault
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Segmentation fault (core dumped)
UPDATE
When i import any other module before ssl
, say hashlib
, i get a different error
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/ssl.py", line 101, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/local/lib/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so)
libpython3.6-minimal
package? This is supposed to provide the/usr/lib/python3.6/ssl.py
file that seems to break the interpreter. – Byte Commander Apr 23 '19 at 17:07sudo apt remove libpython3.6-minimal
and thensudo apt install libpython3.6-minimal
? When i try removing it withsudo apt remove libpython3.6-minimal
, it shows a large number of packages that will be removed likeapparmor
,apport-kde
, lots of libboost libs. Can it make the system unusable? – lovesh Apr 23 '19 at 17:12sudo apt install --reinstall libpython3.6-minimal
reinstalls the package without changing any dependencies. Should have mentioned that directly, sorry. – Byte Commander Apr 23 '19 at 17:18sudo dpkg -V | awk '$2!="c"{print $NF}' | xargs dpkg -S | grep -Ev 'diversion|, ' | grep -Po '.*(?=: )' | sort -u
What this does is to letdpkg
scan all files that belong to any installed package on your system and compare them to the respective hash that is stored with the package. That way it can find any changed or corrupted files. The rest of the line processes the output to give you back a list of the packages they belong to instead of the changed files themselves. – Byte Commander Apr 23 '19 at 17:30libindy-crypto
is (doesn't seem to be part of the standard repos), but ifopenssl
was broken, that could definitely cause your problem, I think. Try reinstalling it withsudo apt install --reinstall openssl
and maybe also the other mentioned packages. – Byte Commander Apr 23 '19 at 17:39libindy-crypto
is non-system project and irrelevant here. I didsudo apt install --reinstall
for openssl, code, python3-update-manager and finally libpython3.6-minimal. But still same issue. – lovesh Apr 23 '19 at 17:44