k0p*_*kus 2 command-line apt terminator 16.04
我terminator作为我的主终端运行。我记得我的系统上唯一的变化是运行
sudo apt update && sudo apt -y dist-upgrade
Run Code Online (Sandbox Code Playgroud)
运行良好。然而终结者将不再启动:
$ terminator
Gtk-Message: Failed to load module "overlay-scrollbar"
PluginRegistry::load_plugins: Importing plugin __init__.py failed: 'module' object has no attribute 'AVAILABLE'
Floating point exception (core dumped)
Run Code Online (Sandbox Code Playgroud)
我尝试清除它:
sudo apt purge -y terminator && \
sudo apt install -y terminator
Run Code Online (Sandbox Code Playgroud)
然而问题依然存在。如何让终结者重新开始?
此外,终结者的版本似乎没有改变:
终结者的版本似乎没有改变:
cat /var/log/apt/history.log | grep terminator
Commandline: apt purge terminator
Purge: terminator:amd64 (0.98-1)
Commandline: apt install terminator
Install: terminator:amd64 (0.98-1)
Commandline: apt purge terminator
Purge: terminator:amd64 (0.98-1)
Run Code Online (Sandbox Code Playgroud)
小智 12
使用以下命令检查您的 Python 默认版本:
python -V
Run Code Online (Sandbox Code Playgroud)
终结者不适用于 Python 3。就我而言,这正是问题所在。我的默认 Python 命令指向版本 3 而不是版本 2。
您可以使用以下命令检查当前的默认 python:
which python
Run Code Online (Sandbox Code Playgroud)
因为我已经安装了 Python 2.7,所以我一运行:
sudo ln -sf /usr/bin/python2.7 /usr/bin/python
Run Code Online (Sandbox Code Playgroud)
终结者又开始工作了。
我在假设清除终结者会删除其配置的情况下工作。此情况并非如此。我不得不手动删除它(请注意,您的个人资料将丢失):
$ rm ~/.config/terminator/* -rfv
Run Code Online (Sandbox Code Playgroud)
部分错误信息是可以忽略的警告,即:
Gtk-Message: Failed to load module "overlay-scrollbar"
ConfigBase::load: Unable to open /home/philipp/.config/terminator/config ([Errno 2] No such file or directory: '/home/philipp/.config/terminator/config')
PluginRegistry::load_plugins: Importing plugin __init__.py failed: 'module' object has no attribute 'AVAILABLE'
Run Code Online (Sandbox Code Playgroud)
这将始终按照此错误报告中的指示显示
删除配置会使终结者重新启动。
@desveladisimo 的回答将解决您的问题,但您将无法使用 Python 3 作为默认版本。为了默认使用 Python3 并且仍然可以使用终止器,您可以通过以下步骤配置 Terminator 使用 Python2:-
编辑 /usr/bin/terminator
sudo vi /usr/bin/terminator
Run Code Online (Sandbox Code Playgroud)
并更改第一行(shebang)
#!/usr/bin/python
Run Code Online (Sandbox Code Playgroud)
到
#!/usr/bin/python2
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15776 次 |
| 最近记录: |