未找到 sudo apt-get 命令

未找到 sudo apt-get 命令

我无法运行 apt-get update 或任何涉及 apt-get 命令的操作。我尝试了 dpkg --configure -a,它显示的内容如下。

root@lxoric-AOD270:/home/lxoric# sudo dpkg --configure -a
Setting up google-chrome-stable (38.0.2125.122-1) ...
dpkg: error processing package google-chrome-stable (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up update-notifier-common (0.154.1ubuntu1) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 28, in <module>
import apt
  File "/usr/lib/python2.7/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
  ImportError: /usr/lib/i386-linux-gnu/libapt-pkg.so.4.12: invalid ELF header
  dpkg: error processing package update-notifier-common (--configure):
   subprocess installed post-installation script returned error exit status 1
  Processing triggers for menu (2.1.46ubuntu1) ...
  In file "/usr/share/menu/libreoffice-impress", at (or in the definition that ends at) line 18:
  [Desktop Entry]
          ^
  Unexpected end of line.
  Skipping file because of errors...
  /usr/share/menu/ixconn_config: 1: /usr/share/menu/ixconn_config: Syntax error: word unexpected (expecting ")")
  /usr/share/menu/ixconn_folder: 1: /usr/share/menu/ixconn_folder: Syntax error: word unexpected (expecting ")")
  /usr/share/menu/ixconn: 1: /usr/share/menu/ixconn: Syntax error: word unexpected  (expecting ")")
  In file "/usr/share/menu/libreoffice-calc", at (or in the definition that ends at) line 2:
  ~\ekVL    I٤��{S�9<f��}QL�Nm���@)�%8���
                                     ^
  Unexpected end of line.
  Skipping file because of errors...
  In file "/usr/share/menu/libreoffice-calc", at (or in the definition that ends at) line 1:
  command=" META-INF/��PPK��dEMETA-INF/MANIFEST.MFE�M
                                                         �0D������m-j�G{�"      icon="" needs="PK" package="libreoffice-calc" sectio" title=""
     ^
  Expected: """
  install-menu: /etc/menu-methods/openbox: aborting
  update-menus[15714]: Script /etc/menu-methods/openbox returned error status 1.
  Errors were encountered while processing:
   google-chrome-stable
   update-notifier-common
  root@lxoric-AOD270:/home/lxoric# 

答案1

启动(Synaptic 包管理器),在快速搜索框中输入-apt,在列表中您将看到-apt,右键单击并选择(标记为安装),然后单击顶部的应用按钮,如果 apt 已安装,选择(标记为完全删除)并单击应用按钮,完全删除后,您需要重新安装 apt 并重新启动系统。

相关内容