ubuntu 下出現E: Sub-process /usr/bin/dpkg returned an error code

來源:互聯網
上載者:User

在用apt-get安裝軟體時出現了類似於
install-info: No dir file specified; try –help for more information.dpkg:處理 gettext (–configure)時出錯: 子進程 post-installation script 返回了錯誤號碼 1 在處理時有錯誤發生:
findutils

E: Sub-process /usr/bin/dpkg returned an error code (1)

第一種方法:

 
  1. sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak //現將info檔案夾更名
  2. sudo mkdir /var/lib/dpkg/info //再建立一個新的info檔案夾
  3. sudo apt-get update
// 不用解釋了吧
  
  1. apt-get -f install xxx
  2. sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bak
//執行完上一步操作後會在新的info檔案夾下產生一些檔案,現將這些檔案全部移到info.bak檔案夾下
  
  1. sudo rm -rf /var/lib/dpkg/info //把自己建立的info檔案夾刪掉
  2. sudo mv /var/lib/dpkg/info.bak /var/lib/dpkg/info //把以前的info檔案夾重新改回名字

到此問題順利解決

一般上面的這個方法可以解決問題了第二種方法;

  
  1. for i in /usr/share/fonts/X11/* /usr/share/fonts/truetype/*
  2. do sudo touch "$i"
  3. done

第三種方法:
  
  1. sudo apt-get update --fix-missing
  2. sudo apt-get autoremove && sudo apt-get clean && sudo apt-get install -f

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.