破坏了我的软件中心缓存

破坏了我的软件中心缓存

除非我以 root 身份运行,否则软件中心不会启动。以 root 身份运行它时,出现一条有关缓存不可写的消息。我的 .cache 文件夹位于单独的驱动器上,并符号链接到我的主目录。有趣的是,此后软件中心似乎可以正常工作。我认为它在我安装 Pidgin 后就坏了。

这是我尝试以自己的身份运行软件中心时的终端输出

winobes@epoch:~$ software-center
2013-05-11 19:53:54,872 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2013-05-11 19:53:54,881 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/share/software-center/softwarecenter/db/database.py', 204, '_get_new_xapiandb')'
2013-05-11 19:53:54,881 - root - WARNING - failed to add sca db Couldn't detect type of database
2013-05-11 19:53:54,958 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/dbus/proxies.py', 410, '_introspect_error_handler')'
2013-05-11 19:53:54,957 - dbus.proxies - ERROR - Introspect error on com.ubuntu.sso:/com/ubuntu/sso/credentials: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/ubuntu-sso-client/ubuntu-sso-login exited with status 1
Traceback (most recent call last):
  File "/usr/bin/software-center", line 130, in <module>
    app = SoftwareCenterAppGtk3(options, args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 338, in __init__
    self.icons)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/appmanager.py", line 66, in __init__
    self.oauth_token = helper.find_oauth_token_sync()
  File "/usr/share/software-center/softwarecenter/backend/ubuntusso.py", line 141, in find_oauth_token_sync
    sso.find_credentials()
  File "/usr/share/software-center/softwarecenter/backend/login_impl/login_sso.py", line 75, in find_credentials
    self.proxy.find_credentials(self.appname, self._get_params())
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/ubuntu-sso-client/ubuntu-sso-login exited with status 1

当我以 root 身份运行时:

winobes@epoch:~$ sudo software-center
[sudo] password for winobes: 
2013-05-11 19:55:20,352 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2013-05-11 19:55:21,000 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2013-05-11 19:55:21,002 - softwarecenter.plugin - INFO - activating plugin '<module 'webapps_activation' from '/usr/share/software-center/softwarecenter/plugins/webapps_activation.pyc'>'
2013-05-11 19:55:21,005 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2013-05-11 19:55:21,005 - root - ERROR - Could not find any typelib for LaunchpadIntegration
(software-center:28600): IBUS-WARNING **: The owner of /home/winobes/.config/ibus/bus is not root!
2013-05-11 19:55:21,044 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2013-05-11 19:55:23,322 - softwarecenter.ui.gtk3.widgets.exhibits - WARNING - download failed: '<class 'gi._glib.GError'>', 'Operation not supported'
2013-05-11 19:55:29,214 - softwarecenter.db.utils - INFO - software-center-agent finished with status 0

软件中心似乎当我使用 sudo 运行时,至少它可以启动。但它让我有点紧张,我希望能够使用启动器...

我尝试过的事情:

sudo chown winobes ~/.cache

sudo chown winobes ~/.cache/software-center

sudo apt-get install --reinstall software-center

感谢您的帮助和见解:)

答案1

噢!

sudo chown winobes ~/.cache

显然只是改变了符号链接的所有者....

sudo chown winobes /mnt/data/.cache

解决了我的问题。

相关内容