我安装了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
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
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
参考资料:
Software和更新:
这是我的软件并更新了最新的状态:

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:~$ 发布于 2019-12-10 21:09:59
您不应该使用PPA来安装终止程序。您必须删除有问题的PPA
sudo add-apt-repository -r ppa:gnome-terminator/ppa然后从宇宙口袋里安装终结者。
您所需要的只是启用这个口袋并从它安装包:
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install terminator然后按计划使用:
$终止符-v终止符1.91
发布于 2020-11-10 06:15:19
现在,您可以在项目转移到GitHub后使用此页面中提供的说明:
https://github.com/gnome-terminator/terminator/blob/master/INSTALL.md#source-install
发布于 2020-02-11 17:16:45
语法错误是由于/usr/bin/terminator正在调用python而不是显式调用python2,并且在您的环境中python指向python3。
一个简单的解决方法是让终结者调用python2,就像它应该:
sudo sed '1s.!/usr/bin/python.!/usr/bin/python2.' /usr/bin/terminatorhttps://askubuntu.com/questions/1195079
复制相似问题