DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need some help with this please, any tips will be much appreciated:
root@darkstar:/home/thermal# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
firebird2.5-common firebird2.5-common-doc firebird2.5-server-common firebird3.0-common firebird3.0-common-doc
fonts-mathjax gcc-4.9-doc gdebi-core gfortran-4.9-doc hardening-includes imagemagick-common libadns1 libappstreamqt1
libboost-chrono1.61.0 libboost-date-time1.61.0 libboost-filesystem1.61.0 libboost-iostreams1.61.0
libboost-program-options1.61.0 libboost-python1.61.0 libboost-random1.61.0 libboost-thread1.61.0 libchm1 libfbclient2
libfbembed2.5 libglew1.13 libjs-mathjax libjs-sphinxdoc libkf5gpgmepp5 libkf5kipi-bin libkwineffects8 libkwinglutils8
libkwinxrenderutils8 liblegacytaskmanager5 liblircclient0 liblivemedia52 libllvm3.8 libmagickcore-6.q16-2 libmsn0.3v5
libmysqlclient18 libpango1.0-0 libpodofo0.9.4 libpoppler61 libvncclient1 libx265-87 linux-image-4.6.0-1-amd64
linux-image-4.7.0-1-amd64 linux-image-4.8.0-1-amd64 mariadb-common python-apsw python-beautifulsoup python-bs4
python-cherrypy3 python-cssselect python-cssutils python-dateutil python-dnspython python-feedparser python-html5lib
python-libxml2 python-lxml python-markdown python-mechanize python-netifaces python-pygments python-pyparsing python-pyqt5
python-pyqt5.qtsvg python-pyqt5.qtwebkit python-repoze.lru python-routes python-sip python-utidylib python-webencodings
python-webob python-yaml vlc-nox
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2
The following packages will be upgraded:
libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2
2 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
5 not fully installed or removed.
Need to get 0 B/19.0 MB of archives.
After this operation, 79.9 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "/usr/lib/python3.5/io.py", line 52, in <module>
File "/usr/lib/python3.5/abc.py", line 6, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 669, in exec_module
File "<frozen importlib._bootstrap_external>", line 773, in get_code
File "<frozen importlib._bootstrap_external>", line 484, in _compile_bytecode
EOFError: marshal data too short
Aborted
E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1)
E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10
root@darkstar:/home/thermal#
Hi thermal, I'm just answering because no-one else has, although I have no special insight into the problem.
However, it looks as if it isn't apt that is not working, it's Python.
So, my first move if I were you would be to delete the Python cache (in case it has become corrupted) and see if that does the trick.
If this doesn't work then reinstalling Python 3.5 would probably be the next step.
If the above is alien-speak for you, let us know and someone can work through it with you.
Thanks hydruga, I deleted the python cache but that didn't help.
When I try to reinstall python3 I get this:
Code:
root@darkstar:/home/thermal# apt-get install --reinstall python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libwebkit2gtk-4.0-37 : Depends: libjavascriptcoregtk-4.0-18 (= 2.14.2-1) but 2.14.3-1 is to be installed
python3 : PreDepends: python3-minimal (= 3.5.3-1) but 3.5.1-4 is to be installed
Depends: libpython3-stdlib (= 3.5.3-1) but 3.5.1-4 is to be installed
It tries to downgrade python3 and libjavascriptcoregtk.
When I run apt-get -f install it aborts with the same python error I've been getting.
Quote:
Originally Posted by erik2282
Part of the output asks you to run a command. Have you ran it?
erik2282, yes, apt refuses to complete any install or uninstall task because of this issue with python.
I am not sure how I got the system into this state. Perhaps because I played around with aptitude recently. (unaware that mixing use of the package-managers was not really a good idea.)
My last upgrade was a few weeks ago, after a much longer than normal for me delay. I always update the package index and install all recommended upgrades. Spotify is the only external source I have in my sources.list
Code:
root@darkstar:/home/thermal# cat /etc/apt/sources.list /etc/apt/sources.list.d/*
# deb cdrom:[Debian GNU/Linux stretch-DI-alpha4 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20151024-18:12]/ stretch contrib main non-free
# deb cdrom:[Debian GNU/Linux stretch-DI-alpha4 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20151024-18:12]/ stretch contrib main non-free
deb http://ftp.us.debian.org/debian/ stretch contrib main
deb-src http://ftp.us.debian.org/debian/ stretch main
deb http://security.debian.org/ stretch/updates main contrib non-free
deb http://http.us.debian.org/debian/ stretch non-free contrib main
deb-src http://security.debian.org/ stretch/updates main contrib non-free
deb http://repository.spotify.com stable non-free
I am not sure how I got the system into this state. Perhaps because I played around with aptitude recently. (unaware that mixing use of the package-managers was not really a good idea.)
My last upgrade was a few weeks ago, after a much longer than normal for me delay. I always update the package index and install all recommended upgrades. Spotify is the only external source I have in my sources.list
Code:
root@darkstar:/home/thermal# cat /etc/apt/sources.list /etc/apt/sources.list.d/*
# deb cdrom:[Debian GNU/Linux stretch-DI-alpha4 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20151024-18:12]/ stretch contrib main non-free
# deb cdrom:[Debian GNU/Linux stretch-DI-alpha4 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20151024-18:12]/ stretch contrib main non-free
deb http://ftp.us.debian.org/debian/ stretch contrib main
deb-src http://ftp.us.debian.org/debian/ stretch main
deb http://security.debian.org/ stretch/updates main contrib non-free
deb http://http.us.debian.org/debian/ stretch non-free contrib main
deb-src http://security.debian.org/ stretch/updates main contrib non-free
deb http://repository.spotify.com stable non-free
I'm not on a Debian system, so I can't verify which repos you should have as default (perhaps a Debian user will chime in), but https://wiki.debian.org/SourcesList indicates that you should have something along the lines of (ignoring the source repos for the moment):
root@darkstar:/home/thermal# dpkg -l *python3* | grep -v ^un
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-================-============-===============================================================================
ii libpython3-stdlib:amd64 3.5.1-4 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.4:amd64 3.4.4-3 amd64 Shared Python runtime library (version 3.4)
ii libpython3.4-minimal:amd64 3.4.4-3 amd64 Minimal subset of the Python language (version 3.4)
ii libpython3.4-stdlib:amd64 3.4.4-3 amd64 Interactive high-level object-oriented language (standard library, version 3.4)
ii libpython3.5:amd64 3.5.3-1 amd64 Shared Python runtime library (version 3.5)
ii libpython3.5-minimal:amd64 3.5.3-1 amd64 Minimal subset of the Python language (version 3.5)
ii libpython3.5-stdlib:amd64 3.5.3-1 amd64 Interactive high-level object-oriented language (standard library, version 3.5)
ii python3 3.5.1-4 amd64 interactive high-level object-oriented language (default python3 version)
ii python3-apt 1.1.0~beta5 amd64 Python 3 interface to libapt-pkg
ii python3-aptdaemon 1.1.1+bzr982-1 all Python 3 modules for the server and client of aptdaemon
ii python3-aptdaemon.gtk3widgets 1.1.1+bzr982-1 all Python 3 GTK+ 3 widgets to run an aptdaemon client
ii python3-brlapi 5.4-4 amd64 Braille display access via BRLTTY - Python3 bindings
ii python3-cairo 1.10.0+dfsg-5+b1 amd64 Python 3 bindings for the Cairo vector graphics library
ii python3-chardet 2.3.0-2 all universal character encoding detector for Python3
ii python3-cups 1.9.73-1 amd64 Python3 bindings for CUPS
ii python3-cupshelpers 1.5.7-2 all Python utility modules around the CUPS printing system
ii python3-dbus 1.2.4-1 amd64 simple interprocess messaging system (Python 3 interface)
ii python3-debian 0.1.29 all Python 3 modules to work with Debian-related data formats
ii python3-debianbts 2.6.1 all Python interface to Debian's Bug Tracking System
ii python3-defer 1.0.6-2 all Small framework for asynchronous programming (Python 3)
ii python3-gi 3.22.0-2 amd64 Python 3 bindings for gobject-introspection libraries
ii python3-httplib2 0.9.2+dfsg-1 all comprehensive HTTP client library written for Python3
ii python3-louis 3.0.0-3 all Python bindings for liblouis
ii python3-minimal 3.5.1-4 amd64 minimal subset of the Python language (default python3 version)
ii python3-pexpect 4.2.1-1 all Python 3 module for automating interactive applications
ii python3-pil:amd64 3.4.2-1 amd64 Python Imaging Library (Python3)
ii python3-pkg-resources 33.1.1-1 all Package Discovery and Resource Access using pkg_resources
ii python3-ptyprocess 0.5.1-1 all Run a subprocess in a pseudo terminal from Python 3
ii python3-pyatspi 2.20.3+dfsg-1 all Assistive Technology Service Provider Interface - Python3 bindings
ii python3-pycurl 7.43.0-2 amd64 Python bindings to libcurl (Python 3)
ii python3-pyqt5 5.7+dfsg-4 amd64 Python 3 bindings for Qt5
ii python3-pysimplesoap 1.16-2 all simple and lightweight SOAP Library (Python 3)
ii python3-renderpm:amd64 3.3.0-1+b1 amd64 python low level render interface
ii python3-reportbug 7.1.2 all Python modules for interacting with bug tracking systems
ii python3-reportlab 3.3.0-1 all ReportLab library to create PDF documents using Python3
ii python3-reportlab-accel:amd64 3.3.0-1+b1 amd64 C coded extension accelerator for the ReportLab Toolkit
ii python3-requests 2.12.4-1 all elegant and simple HTTP library for Python3, built for human beings
ii python3-sip 4.18.1+dfsg-1 amd64 Python 3/C++ bindings generator runtime library
ii python3-six 1.10.0-3 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-smbc 1.0.15.6-1 amd64 Python 3 bindings for the Samba client library
ii python3-software-properties 0.96.20.2-1 all manage the repositories that you install software from
ii python3-speechd 0.8.6-1 all Python interface to Speech Dispatcher
ii python3-uno 1:5.2.4-2 amd64 Python-UNO bridge
ii python3-urllib3 1.19.1-1 all HTTP library with thread-safe connection pooling for Python3
ii python3-xdg 0.25-4 all Python 3 library to access freedesktop.org standards
ii python3.4 3.4.4-3 amd64 Interactive high-level object-oriented language (version 3.4)
ii python3.4-minimal 3.4.4-3 amd64 Minimal subset of the Python language (version 3.4)
iU python3.5 3.5.3-1 amd64 Interactive high-level object-oriented language (version 3.5)
iF python3.5-minimal 3.5.3-1 amd64 Minimal subset of the Python language (version 3.5)
We need to figure out what can be done with the unpacked python3.5 package - if it were an ordinary package we could just remove it and try a reinstall, but so much of the system is dependent on python, we have to tread warily.
In the meantime, have you tried an update+upgrade since you changed the repos to see if that helps at all (at least with the dependencies situation)?
Maybe aptitude can help figure out a good way forward.
Dependency resolution is better than apt-get and running the ncurses interface lets you look around and try things.
FWIW, this can be a fairly common occurrence if you don't keep up with testing/sid.
Edit: disable spotify until you're fixed - don't know what packages it provides, but it's for stable, not testing so may introduce dependency conflicts with your system.
Last edited by descendant_command; 02-06-2017 at 04:39 AM.
I would say you need to reinstall python3.5, but you cannot because of this error.
Probably you can unpack the package and copy /usr/lib/python3.5/abc.py from the package, looks like this file was damaged (but probably there are others too).
Also try to remove *.pyc file(s) in that directory.
Firstly, you need to make a system backup/image. If you haven't been doing so, this is something you should be doing regularly - if so, it would have been reasonably easy to revert to a previous snapshot when this situation was first encountered.
Secondly, given that you appear to have both Python 3.4 and 3.5 installed, and 3.5 appears borked but the default, you might try changing the default Python to 3.4 and then running apt-get in the hope that it uses the good Python 3.4 and therefore allows us at least to use apt functionality.
pan64 I tried your suggestion, replaced both .py files complained about in the python error with fresh ones from the version-equivalent package - no joy.
hydrurga, my default python was set to 2.7 already but I went ahead and setup the system-wide alternatives as in that link you posted. apt still insists on running the 3.5 (and erroring out)
I'm going to throw in the towel on this and just re-image my system (sometime soon).
Thanks all of you very much, you've provided amazing assistance.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.