无法在 Ubuntu 14.04 LTS 中安装更新

无法在 Ubuntu 14.04 LTS 中安装更新

我的自动软件更新程序停止工作了,而且我无法修复它。

我尝试了建议的修复方法这里但它不起作用。

然后我向一位高级 Unix 开发人员寻求帮助,他建议运行此命令sudo apt-get --purge remove software-center,然后运行此命令sudo apt-get -f install,但仍然没有帮助。

我使用的是 Ubuntu 14.04,并尝试了所有能找到的方法来修复它,但是没有什么正在为我工​​作。我无法发布发生的事情的截图(没有足够的声望点数)。我已经挣扎了好几天,我真的希望有人能帮助我。

这是我制作成 Gist 文件的终端输出:`➜ ~ sudo apt-get --fix-missing install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libmono-addins-gui0.2-cil libmono-addins0.2-cil libmono-corlib2.0-cil
  libmono-entityframework-sqlserver6.0-cil libmono-entityframework6.0-cil
  libmono-sharpzip2.6-cil libmono-system2.0-cil
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
➜  ~  software-center
2015-07-28 08:39:16,532 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2015-07-28 08:39:17,574 - softwarecenter.plugin - INFO - activating plugin '<module 'webapps_activation' from '/usr/share/software-center/softwarecenter/plugins/webapps_activation.pyc'>'
2015-07-28 08:39:17,992 - softwarecenter.backend.reviews - WARNING - error creating bsddb: '(22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')' (corrupted?)
2015-07-28 08:39:17,992 - softwarecenter.backend.reviews - ERROR - trying to repair DB failed
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/backend/reviews/__init__.py", line 358, in _save_review_stats_cache_blocking
    self._dump_bsddbm_for_unity(outfile, outdir)
  File "/usr/share/software-center/softwarecenter/backend/reviews/__init__.py", line 377, in _dump_bsddbm_for_unity
    0600)
DBInvalidArgError: (22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')
2015-07-28 08:39:18,023 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:535: Warning: Source ID 74 was not found when attempting to remove it
  return super(MainContext, self).iteration(may_block)
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:535: Warning: Source ID 76 was not found when attempting to remove it
  return super(MainContext, self).iteration(may_block)
No bp log location saved, using default.
[000:000] Cpu: 6.58.9, x8, 3400Mhz, 11892MB
[000:001] Computer model: Not available
[000:001] Browser XEmbed support present: 1
[000:001] Browser toolkit is Gtk2.
[000:003] Using Gtk2 toolkit
No bp log location saved, using default.
[000:000] Cpu: 6.58.9, x8, 3400Mhz, 11892MB
[000:000] Computer model: Not available
[000:126] No bp log location saved, using default.
[000:127] Cpu: 6.58.9, x8, 3400Mhz, 11892MB
[000:127] Computer model: Not available
[000:127] Browser XEmbed support present: 1
[000:127] Browser toolkit is Gtk2.
[000:127] Using Gtk2 toolkit
[000:476] No bp log location saved, using default.
[000:477] Cpu: 6.58.9, x8, 3400Mhz, 11892MB
[000:477] Computer model: Not available
2015-07-28 08:39:22,076 - softwarecenter.ui.gtk3.views.lobbyview - WARNING - skipping exhibit for: 'u'leadwerks\r\nleadwerks-indie'' not available
/usr/bin/software-center:184: Warning: Source ID 158 was not found when attempting to remove it
  Gtk.main()
2015-07-28 08:39:23,657 - softwarecenter.backend.spawn_helper - WARNING - exit code 1 from helper for '['/usr/share/software-center/piston_generic_helper.py', '--datadir', '/usr/share/software-center/', '--needs-auth', '--no-relogin', 'SoftwareCenterAgentAPI', 'subscriptions_for_me', '{"complete_only": true}']'
2015-07-28 08:39:23,658 - softwarecenter.backend.spawn_helper - WARNING - got error from helper: 'ERROR:softwarecenter.backend.ubuntusso:api.whoami failed with APIError: '401: {'status': '401', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-language': 'en', 'transfer-encoding': 'chunked', 'strict-transport-security': 'max-age=15768000; includeSubDomains; preload', 'vary': 'Authorization,Accept-Language,Cookie', 'server': 'gunicorn/19.3.0', 'x-bzr-revision-number': '1302', 'date': 'Tue, 28 Jul 2015 12:39:23 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'text/html; charset=utf-8', 'www-authenticate': 'OAuth realm="API"'}'
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/backend/ubuntusso.py", line 119, in verify_token_sync
    res = api.whoami()
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 120, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 131, in wrapper
    body = func(*args, **kwargs)
  File "/usr/share/software-center/softwarecenter/backend/piston/ubuntusso_pristine.py", line 22, in whoami
    scheme=AUTHENTICATED_API_SCHEME)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 787, in _get
    extra_headers=extra_headers)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 491, in get
    return self.request_url(url, method='GET', headers=headers)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 435, in request_url
    body = handler.handle(response, response_body)
  File "/usr/lib/python2.7/dist-packages/piston_mini_client/failhandlers.py", line 116, in handle
    data=self.data)
APIError: 401: {'status': '401', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-language': 'en', 'transfer-encoding': 'chunked', 'strict-transport-security': 'max-age=15768000; includeSubDomains; preload', 'vary': 'Authorization,Accept-Language,Cookie', 'server': 'gunicorn/19.3.0', 'x-bzr-revision-number': '1302', 'date': 'Tue, 28 Jul 2015 12:39:23 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'text/html; charset=utf-8', 'www-authenticate': 'OAuth realm="API"'}
ERROR: can not obtain a oauth token
'
2015-07-28 08:39:23,658 - softwarecenter.db.update - WARNING - update_from_software_center_agent: error: 'ERROR:softwarecenter.backend.ubuntusso:api.whoami failed with APIError: \'401: {\'status\': \'401\', \'x-xss-protection\': \'1; mode=block\', \'x-content-type-options\': \'nosniff\', \'content-language\': \'en\', \'transfer-encoding\': \'chunked\', \'strict-transport-security\': \'max-age=15768000; includeSubDomains; preload\', \'vary\': \'Authorization,Accept-Language,Cookie\', \'server\': \'gunicorn/19.3.0\', \'x-bzr-revision-number\': \'1302\', \'date\': \'Tue, 28 Jul 2015 12:39:23 GMT\', \'x-frame-options\': \'SAMEORIGIN\', \'content-type\': \'text/html; charset=utf-8\', \'www-authenticate\': \'OAuth realm="API"\'}\'\nTraceback (most recent call last):\n  File "/usr/share/software-center/softwarecenter/backend/ubuntusso.py", line 119, in verify_token_sync\n    res = api.whoami()\n  File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py", line 120, in wrapper\n    return func(self, *args, **kwargs)\n  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 131, in wrapper\n    body = func(*args, **kwargs)\n  File "/usr/share/software-center/softwarecenter/backend/piston/ubuntusso_pristine.py", line 22, in whoami\n    scheme=AUTHENTICATED_API_SCHEME)\n  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 787, in _get\n    extra_headers=extra_headers)\n  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 491, in get\n    return self.request_url(url, method=\'GET\', headers=headers)\n  File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py", line 435, in request_url\n    body = handler.handle(response, response_body)\n  File "/usr/lib/python2.7/dist-packages/piston_mini_client/failhandlers.py", line 116, in handle\n    data=self.data)\nAPIError: 401: {\'status\': \'401\', \'x-xss-protection\': \'1; mode=block\', \'x-content-type-options\': \'nosniff\', \'content-language\': \'en\', \'transfer-encoding\': \'chunked\', \'strict-transport-security\': \'max-age=15768000; includeSubDomains; preload\', \'vary\': \'Authorization,Accept-Language,Cookie\', \'server\': \'gunicorn/19.3.0\', \'x-bzr-revision-number\': \'1302\', \'date\': \'Tue, 28 Jul 2015 12:39:23 GMT\', \'x-frame-options\': \'SAMEORIGIN\', \'content-type\': \'text/html; charset=utf-8\', \'www-authenticate\': \'OAuth realm="API"\'}\nERROR: can not obtain a oauth token\n'
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:523: Warning: Source ID 20 was not found when attempting to remove it
  super(MainLoop, self).run()
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:535: Warning: Source ID 23 was not found when attempting to remove it
  return super(MainContext, self).iteration(may_block)
2015-07-28 08:39:27,335 - softwarecenter.db.utils - INFO - software-center-agent finished with status 0
➜  ~  `

尝试运行该命令后cat /etc/apt/sources,出现此错误:

cat: /etc/apt/sources: No such file or directory

相关内容