sys.path:
['/ usr / lib / update-notifier', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/local/lib/python2.6/ plat-linux3 ',' /usr/local/lib/python2.6/lib-tk ',' /usr/local/lib/python2.6/lib-old ',' /usr/local/lib/python2.6 / lib-dynload ',' /usr/local/lib/python2.6/site-packages ']
terry@terrylaptop:/usr/lib$ sudo apt-get install python-debian
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-debian is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 239 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up update-notifier-common (0.119ubuntu8.6) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 26, in <module>
import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of flashplugin-installer:
flashplugin-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
Package update-notifier-common is not configured yet.
dpkg: error processing flashplugin-installer (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
update-notifier-common
flashplugin-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Masalah ini terjadi setiap kali ketika saya mencoba menggunakan apt-get install untuk memperbarui Ubuntu saya. Saya menggunakan 12.04.01 LTS.
Saya juga menginstal python-debian dari tautan ini: http://pkgs.org/ubuntu-12.04/ubuntu-main-i386/python-debian_0.1.21ubuntu1_all.deb.html Tetapi tidak berhasil.
Adakah yang bisa membantu saya? Terima kasih banyak. Saya mencari di Google tetapi sepertinya ini sudah diperbaiki di versi lama.
terry@terrylaptop:/usr/lib$ sudo apt-get install dolphin
Reading package lists... Done
Building dependency tree
Reading state information... Done
dolphin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 239 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up update-notifier-common (0.119ubuntu8.6) ...
['/usr/lib/update-notifier', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/local/lib/python2.6/plat-linux3', '/usr/local/lib/python2.6/lib-tk', '/usr/local/lib/python2.6/lib-old', '/usr/local/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/site-packages']
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 29, in <module>
import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of flashplugin-installer:
flashplugin-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
Package update-notifier-common is not configured yet.
dpkg: error processing flashplugin-installer (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
update-notifier-common
flashplugin-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
terry@terrylaptop:/usr/lib$ ls /usr/local/lib/python2.6/debian.deb822.py
/usr/local/lib/python2.6/debian.deb822.py
terry@terrylaptop:/usr/lib$ cat /usr/local/lib/python2.6/debian.deb822.py
import warnings
warnings.warn("please use 'debian.deb822' instead", DeprecationWarning,
stacklevel=2)
from debian.deb822 import *
Anda dapat melihat debian.deb822 di /usr/local/lib/python2.6, tetapi masih tidak dapat menemukannya.
------ pembaruan terakhir pada 2/20 ----------------
terry@terrylaptop:/usr/local/bin$ ls -l /usr/bin/py*
-rwxr-xr-x 1 root root 3752 May 2 2012 /usr/bin/py3_compilefiles
-rwxr-xr-x 1 root root 97759 May 2 2012 /usr/bin/pycentral
-rwxr-xr-x 1 root root 4124 Apr 18 2012 /usr/bin/pyclean
-rwxr-xr-x 1 root root 11933 Apr 18 2012 /usr/bin/pycompile
-rwxr-xr-x 1 root root 3723 May 2 2012 /usr/bin/py_compilefiles
lrwxrwxrwx 1 root root 8 Apr 27 2012 /usr/bin/pydoc -> pydoc2.7
-rwxr-xr-x 1 root root 79 Aug 1 2012 /usr/bin/pydoc2.7
lrwxrwxrwx 1 root root 12 Apr 27 2012 /usr/bin/pygettext -> pygettext2.7
-rwxr-xr-x 1 root root 22103 Aug 1 2012 /usr/bin/pygettext2.7
-rwxr-xr-x 1 root root 217 Mar 9 2012 /usr/bin/pyhtmlizer
lrwxrwxrwx 1 root root 24 Feb 20 07:24 /usr/bin/python -> /usr/loca/bin/python2.7
lrwxrwxrwx 1 root root 24 Jun 14 2012 /usr/bin/python2 -> /usr/local/bin/python2.6
lrwxrwxrwx 1 root root 24 Jun 14 2012 /usr/bin/python2.6 -> /usr/local/bin/python2.6
lrwxrwxrwx 1 root root 29 Apr 27 2012 /usr/bin/pyversions -> ../share/python/pyversions.py
terry@terrylaptop:/usr/local/bin$ ls -l /usr/local/bin/py*
-rwxrwxr-x 1 root root 84 Feb 20 07:21 /usr/local/bin/pydoc
lrwxrwxrwx 1 root root 24 Feb 20 07:31 /usr/local/bin/python -> /usr/local/bin/python2.7
lrwxrwxrwx 1 root root 9 Feb 20 07:23 /usr/local/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 4610075 Jun 14 2012 /usr/local/bin/python2.6
-rwxr-xr-x 1 root root 1424 Jun 14 2012 /usr/local/bin/python2.6-config
-rwxr-xr-x 1 root root 4917197 Feb 20 07:22 /usr/local/bin/python2.7
-rwxr-xr-x 1 root root 1624 Feb 20 07:23 /usr/local/bin/python2.7-config
lrwxrwxrwx 1 root root 16 Feb 20 07:23 /usr/local/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 14 Feb 20 07:23 /usr/local/bin/python-config -> python2-config
Saya masih belum bisa menginstal. Sys.path adalah:
['/usr/lib/update-notifier', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']
------ 2013/2/22 pembaruan ---------------
terry@terrylaptop:/data$ sudo apt-get install python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
python2.7 is already the newest version.
The following packages were automatically installed and are no longer required:
libnepomukdatamanagement4 libkexiv2-10 libkdegames5a libboost-program-options1.46.1 libkdecorations4 libkwinglutils1 libnepomuksync4 libokularcore1abi1 libssl0.9.8 libattica0.3 liblastfm0 libkwineffects1abi3
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
apt
package-management
Terry
sumber
sumber
Jawaban:
Coba instal ulang paket yang seharusnya berisi debian.deb822:
sumber
Dalam kasus saya, saya harus menghapus semua paket yang bertentangan seperti
update-notifier
,update-notifier-common
, dll dan kemudian saya berlari:sumber
sudo apt install python3-debian python3-chardet python3-six
dan semuanya baik-baik saja.Saya menggunakan perintah apt-get remove untuk menghapus pembaruan-notifier-common , flashplugin-installer kemudian pemecahan masalah.
Ini perintahnya:
sumber
Saya sudah menginstal python 2.6 dan 2.7 jadi saya harus kembali ke 2.7 yang memiliki debian.deb822
sumber
Anda mungkin menghapus paket debian python, jalankan perintah ini untuk menginstal ulang python-debian dan setelah itu instal paket pembaruan-notifier.
sumber
Dalam kasus saya apa yang diperbaiki di ubuntu 16.04 (masalah masih menggigit bertahun-tahun sejak posting asli) adalah untuk memperbaiki symlink python:
Jadi sekarang saya punya:
Sebelumnya
python3
menunjuk kepython3.5
. Setelah saya tautkan kembali untukpython3.6
apt
berfungsi kembali.Saat ini saya memiliki python 2.7, 3.5 dan 3.6 yang diinstal berdampingan.
sumber
python3.7
yang memilikipython3
titik untukpython3.7
bukannyapython3.6
Solusi saya
Anatomi masalah ini
pada platform saya
dpkg -L python-chardet
mengklaim bahwapython-chardet
akan menggunakan file-file ini:tetapi masalahnya adalah tidak ada yang ada:
Tes lain yang bisa Anda lakukan
Anda juga dapat memeriksa chardet dengan menggunakan biner:
Jika menampilkan sesuatu seperti ini, lib rusak :
Pesan kesalahan asli saya:
jadi seperti yang saya katakan di atas, cukup instal ulang chardet:
sumber
Bagi saya itu diselesaikan dengan menginstal
python-debian
paket untukpython3
:sumber