运行最新更新并升级后,电脑无法安装或更新,并出现错误
[sudo] password for velukutty:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gettext is already the newest version (0.19.7-2ubuntu3.1).
The following additional packages will be installed:
python3-apport python3-problem-report python3-software-properties software-properties-common software-properties-gtk
Suggested packages:
python3-launchpadlib
The following packages will be upgraded:
python3-apport python3-problem-report python3-software-properties software-properties-common software-properties-gtk
5 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
27 not fully installed or removed.
Need to get 0 B/168 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 255140 files and directories currently installed.)
Preparing to unpack .../python3-problem-report_2.20.1-0ubuntu2.24_all.deb ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error processing archive /var/cache/apt/archives/python3-problem-report_2.20.1-0ubuntu2.24_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to unpack .../python3-apport_2.20.1-0ubuntu2.24_all.deb ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error processing archive /var/cache/apt/archives/python3-apport_2.20.1-0ubuntu2.24_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to unpack .../software-properties-common_0.96.20.10_all.deb ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error processing archive /var/cache/apt/archives/software-properties-common_0.96.20.10_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to unpack .../software-properties-gtk_0.96.20.10_all.deb ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error processing archive /var/cache/apt/archives/software-properties-gtk_0.96.20.10_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to unpack .../python3-software-properties_0.96.20.10_all.deb ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3clean", line 25, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error processing archive /var/cache/apt/archives/python3-software-properties_0.96.20.10_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, re, pwd, grp, os, time, io
File "/usr/lib/python3.5/tempfile.py", line 44, in <module>
import shutil as _shutil
ValueError: source code string cannot contain null bytes
Original exception was:
Traceback (most recent call last):
File "/usr/bin/py3compile", line 26, in <module>
import optparse
File "/usr/lib/python3.5/optparse.py", line 89, in <module>
from gettext import gettext, ngettext
ValueError: source code string cannot contain null bytes
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/python3-problem-report_2.20.1-0ubuntu2.24_all.deb
/var/cache/apt/archives/python3-apport_2.20.1-0ubuntu2.24_all.deb
/var/cache/apt/archives/software-properties-common_0.96.20.10_all.deb
/var/cache/apt/archives/software-properties-gtk_0.96.20.10_all.deb
/var/cache/apt/archives/python3-software-properties_0.96.20.10_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试重新启动并尝试,,,,,但sudo apt-get autoclean
这些命令给出相同的结果sudo apt-get --fix missing
sudo apt-get --fix-broken
sudo apt-get autoremove
sudo apt-get install --reinstall python
那么除了重新安装 ubuntu 还有其他解决方案吗?