Как я могу решить эту ошибку, связанную с gnome-Terminal и программой обновления программного обеспечения?
Из-за этой ошибки мой терминал не открывается ни с помощью сочетания клавиш (CTRL+ALT+T), ни с панели запуска. Он открывается только из опции "Открыть терминал", щелкая правой кнопкой мыши на рабочем столе.
prateek@Home-Alone:~$ sudo apt-get upgrade
[sudo] password for prateek: Reading package lists... Done
Building dependency tree Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
prateek@Home-Alone:~$ sudo apt-get update
Ign:1 http://dl.google.com/linux/chrom... stable InRelease
Hit:2 Index of /node_8.x/ xenial InRelease
Hit:3 Index of /ubuntu xenial InRelease
Hit:4 Index of /repos/vscode/ stable InRelease
Hit:5 Index of /atareao/atareao/ubuntu xenial InRelease
Hit:6 Index of /damien-moore/codeblocks-stable/ubuntu xenial InRelease
Hit:7 https://cli-assets.heroku.com/br... ./ InRelease
Get:8 Index of /ubuntu xenial-security InRelease [107 kB]
Hit:9 http://linux.teamviewer.com/deb stable InRelease
Ign:10 http://dl.google.com/linux/chrom... stable InRelease
Get:11 Index of /ubuntu xenial-updates InRelease [109 kB]
Hit:12 Index of /jonathonf/python-3.6/ubuntu xenial InRelease
Hit:13 http://linux.teamviewer.com/deb preview InRelease
Hit:14 http://dl.google.com/linux/chrom... stable Release
Get:15 Index of /ubuntu xenial-backports InRelease [107 kB]
Hit:16 Index of /openshot.developers/ppa/ubuntu xenial InRelease
Hit:18 Index of /paolorotolo/android-studio/ubuntu xenial InRelease
Hit:19 http://dl.google.com/linux/chrom... stable Release
Hit:20 Index of /webupd8team/java/ubuntu xenial InRelease
Hit:22 Index of /webupd8team/y-ppa-manager/ubuntu xenial InReleaseFetched 323 kB in 2s (129 kB/s)
Error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
Reading package lists... Done
Изображение вышеуказанной ошибки
prateek@Home-Alone:~$ gnome-terminal
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi'
Я думаю, что из-за этого я не могу запустить свой терминал.
ОБНОВЛЕНИЕ: теперь остается только проблема обновления программного обеспечения. Пожалуйста помоги!
prateek@Home-Alone:~$ software-properties-gtk
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 32, in <module>
import aptsources
File "/usr/lib/python3/dist-packages/aptsources/__init__.py", line 3, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 32, in <module>
import aptsources
File "/usr/lib/python3/dist-packages/aptsources/__init__.py", line 3, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
2 ответа
Решение
Из комментариев:
За
GDBus
ошибка:Удалить
20packagekit
с помощью:sudo rm /etc/apt/apt.conf.d/20packagekit
Повторите обновление и обновите:
sudo apt-get update && sudo apt-get upgrade
За
GNOME Terminal not starting
:cd /usr/lib/python3/dist-packages/gi/ sudo ln -s _gi.cpython-35m-x86_64-linux-gnu.so _gi.cpython-36m-x86_64-linux-gnu.so sudo ln -s _gi_cairo.cpython-35m-x86_64-linux-gnu.so _gi_cairo.cpython-36m-x86_64-linux-gnu.so
Вы можете попробовать переустановить свой aptdeamon: sudo apt-get install --reinstall aptdaemon
Или / и обновите вашу ОС: sudo apt-get update; sudo apt-get upgrade; sudo apt-get dist-upgrade