升级至 11.10 后,Hamster 时间追踪器损坏

升级至 11.10 后,Hamster 时间追踪器损坏

从 11.04 升级到 11.10 之后(由于 flash 安装程序出现故障,升级过程相当坎坷),我似乎无法启动 hamster-time-tracker。

输出:

user@machine:~$ hamster-time-tracker 
Traceback (most recent call last):
  File "/usr/bin/hamster-time-tracker", line 478, in <module>
    from hamster import i18n
ImportError: cannot import name i18n

有人对从哪里开始解决这个问题有什么建议吗?

答案1

我能够让仓鼠运行的唯一方法是从源代码构建它:

git clone git://git.gnome.org/hamster-applet
cd hamster-applet
./waf configure build --prefix=/usr
sudo ./waf install

仓鼠计划

答案2

我收到此错误:

$ ./waf configure build --prefix /usr
Checking for program python              : /usr/bin/python 
Checking for Python version >= 2.4.2     : ok 2.7.2 
Checking for program glib-genmarshal     : /usr/bin/glib-genmarshal 
Checking for program glib-mkenums        : /usr/bin/glib-mkenums 
Checking for program dbus-binding-tool   : /usr/bin/dbus-binding-tool 
Checking for program docbook2man         : not found 
Checking for program xml2po              : /usr/bin/xml2po 
Checking for program xsltproc            : /usr/bin/xsltproc 
Checking for program msgfmt              : /usr/bin/msgfmt 
Checking for program intltool-merge      : /usr/bin/intltool-merge 
Checking for gnome-keybindings variables : Package gnome-keybindings was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnome-keybindings.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnome-keybindings' found

但是 gnome-keybindings 不是一个软件包。我必须安装 gnome-control-center-dev:

sudo apt-get install git-core gettext intltool gnome-control-center-dev
git clone git://git.gnome.org/hamster-applet
cd hamster-applet
./waf configure build --prefix=/usr
sudo ./waf install

答案3

清除包并尝试重新安装

正如我所看到的2.32.1-0ubuntu5版本存在于 Oneiric 中,这意味着您的设置有问题。

文件列表包含这两个文件

/usr/bin/hamster-time-tracker
/usr/share/pyshared/hamster/i18n.py

“可能”意味着包已损坏

答案4

当我尝试使用 git 版本的 Hamster,然后恢复到 ubuntu 包时,我遇到了同样的问题。我发现我必须清除包,然后手动删除 /usr/lib/python2.7/hamster,然后重新安装包。

相关内容