在安装或者启动Terminator时可能出现这个问题:

lin@Dev:~$ terminator
File "/usr/bin/terminator", line 123
except (KeyError,ValueError), ex:
^
SyntaxError: invalid syntax

错误原因:语法错误.这是因为Terminator的安装或者运行需要python2的环境,但是却用python3的环境去运行Terminator了.

我们查看Terminator的启动脚本文件,在'/usr/bin'下.

vi /usr/bin/terminator
#!/usr/bin/python
# Terminator - multiple gnome terminals in one window
# Copyright (C) 2006-2010 cmsj@tenshu.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA """Terminator by Chris Jones <cmsj@tenshu.net>""" import sys
import os
import psutil
....
....

第一行标示使用的是系统默认的python脚本.

系统安装的python的版本有两个分别是python2.7和python3.6,当python链接到python2.7时,程序运行正常,链接到python3.6时出现以上的语法错误。

解决方法

1. 将系统默认的python版本链接到2(不建议)

2.  修改terminator的启动脚本(/usr/bin/terminator)如下:

#! /usr/bin/python2

保存退出重新运营terminator,成功.

最新文章

  1. [NOIP2016]愤怒的小鸟
  2. SpringMVC中遇到的Http400 Bad Request 总结
  3. 批量部署ssh信任关系
  4. 对于.h文件和.c文件
  5. Android - ADB 的使用
  6. 2014年全球SEO行业调查报告
  7. nginx去掉单个目录和多个目录PHP执行权限方法
  8. bzoj1532
  9. html类,id规范命名
  10. 【C++】基于socket的多线程聊天室(控制台版)
  11. IndexAction.java (Java之负基础实战)
  12. Laravel学习基础篇之--路由
  13. quick-cocos2d-x与 cocos2d-x的关系
  14. python基础-格式化时间
  15. 数组toString()方法,数组常用操作
  16. 安装 Minio服务
  17. 20-Python3 数据结构
  18. Problem A: 编写函数:三个数的最大最小值
  19. Jmeter(十五)Logic Controllers 之 while Controller
  20. [USACO18FEB]Slingshot

热门文章

  1. 6-关于#include&lt;bits/stdc++.h&gt;
  2. Golang基本结构之练习(day2)
  3. Windows c++程序的基本结构
  4. 我们为什么要在 PHPStorm 中标记目录
  5. Android内核的编译与测试
  6. 【记录】CentOS7安装NODEBB
  7. marathon的高可用服务自动发现和负载均衡
  8. Gym 101201F Illumination (Two-Sat)
  9. Google Tango SDK下载
  10. 洛谷P3224 [HNOI2012]永无乡(线段树合并+并查集)