我安裝了terminator
,它運行得很好,但突然它停止運行了。
當我新增終結者儲存庫時,出現此錯誤:
命令:
sudo add-apt-repository ppa:gnome-terminator/ppa
錯誤:
E:存儲庫'http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu仿生發布'沒有發布文件。
當我terminator
在終端機中運行命令時,出現以下錯誤:
File "/usr/bin/terminator", line 123
except (KeyError,ValueError), ex:
^
SyntaxError: invalid syntax
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 24, 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:
File "/usr/bin/terminator", line 123
except (KeyError,ValueError), ex:
^
SyntaxError: invalid syntax
我使用python3.7
和Ubuntu18.04
參考:
更新
軟體及更新:
這是我的軟體和更新的最新狀態:
Python路徑:
ubuntu@ubuntu-Z97-D3H:~$ which python3;
/usr/bin/python3
ubuntu@ubuntu-Z97-D3H:~$ which python
/usr/bin/python
ubuntu@ubuntu-Z97-D3H:~$ ls -al $(which python python3)
lrwxrwxrwx 1 root root 24 Dec 9 08:46 /usr/bin/python -> /etc/alternatives/python
lrwxrwxrwx 1 root root 9 Oct 25 2018 /usr/bin/python3 -> python3.6
ubuntu@ubuntu-Z97-D3H:~$ dpkg -l | grep python | grep apt
ii python-apt-common 1.6.4 all Python interface to libapt-pkg (locales)
ii python3-apt 1.6.4 amd64 Python 3 interface to libapt-pkg
ii python3-aptdaemon 1.1.1+bzr982-0ubuntu19.1 all Python 3 module for the server and client of aptdaemon
ii python3-aptdaemon.gtk3widgets 1.1.1+bzr982-0ubuntu19.1 all Python 3 GTK+ 3 widgets to run an aptdaemon client
ubuntu@ubuntu-Z97-D3H:~$
答案1
您不應使用 PPA 來安裝 Terminator。您必須刪除有問題的 PPA
sudo add-apt-repository -r ppa:gnome-terminator/ppa
然後安裝終結者宇宙口袋。
您所需要做的就是啟用這個口袋並從中安裝軟體包:
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install terminator
然後按計劃使用它:
$ terminator -v terminator 1.91
答案2
專案移至 GitHub 後,您現在可以使用此頁面上提供的說明:
https://github.com/gnome-terminator/terminator/blob/master/INSTALL.md#source-install
答案3
語法錯誤是由於/usr/bin/terminator
呼叫python
而不是顯式呼叫python2
, 並且在您的環境中python
指向python3
.
一個簡單的解決方法是進行 terminator call python2
,因為它應該:
sudo sed '1s.!/usr/bin/python.!/usr/bin/python2.' /usr/bin/terminator