2017年11月3日

dpkg:無可挽回的致命錯誤,中止操作 ubuntu 10.04 lucid

很久沒新裝套件, 但在 ubuntu 10.04 停止長期支援 LTS 後, 竟然無法使用 synaptic, 用指令模式也出現錯誤如下。查了很久, 也試了很多, 都失敗... 終於在這一篇找到解決問題的方法 (see ubuntu forum)

簡單地說, 把 /var/lib/dpkg/status 這個檔備份後, 再編輯此檔。
尋找造成錯誤的套件, 以此例來說, 就是 `nmap' 套件

Package: nmap
Status: install ok installed
Priority: extra
Section: net
Installed-Size: 6232

... (以下略)

把這個和 nmap 段落相關的刪除, 再重新執行 sudo apt-get upgrade 即可。

==原本的錯誤==

sudo apt-get upgrade
[sudo] password for yinung:
正在讀取套件清單... 完成
正在重建相依關係         
正在讀取狀態資料... 完成
下列套件將會被升級:
  xxxxx xxxx-doc
升級 2 個,新安裝 0 個,移除 0 個,有 0 個未被升級。
需要下載 0B/32.0MB 的套件檔。
此操作完成之後,會多佔用 17.3MB 的磁碟空間。
是否繼續進行 [Y/n]?Y
(正在讀取資料庫 ...
dpkg: warning: files list file for package `antiword' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libiw29' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `ttf-cwtex-center-cwkai' missing, assuming package has no files currently installed.
(正在讀取資料庫 ... 95%dpkg:無可挽回的致命錯誤,中止操作:

 buffer_read(fd) 失敗:套件 `nmap' 的檔案列表檔: 輸入/輸出錯誤
E: Sub-process /usr/bin/dpkg returned an error code (2)


===解決方法原文===

1. Go into the /var/lib/dpkg directory
2. Make a backup of the "status" file
3. Edit the "status" file
4. Search the package that gave the error
5. Just delete the lines from this package (but let all other lines that concern other packages even if they contains the broken package in their "Replaces" or "Depends" fields)



在 playonlinux 4.2.1 下裝 firefox 56.0.2 (32 位元) 的問題

或許會有人有相同的問題, 紀錄如下:

我在 ubuntu 10.02 裡, 使用預設方式在 playonlinux 4.2.1 下使用 wine 2.18 (2.0.1 好像失敗) 裝 firefox 56.0.2 (32 位元), 第一次啟動很正常, :), 但第二次就沒有畫面了, google 了很久, 終於看到有人提出解決方法

只要在 firefox 網址列, 輸入
about:config

然後找到
browser.tabs.remote.autostart2

把它的值, 從 true 改成 false 即可 (滑鼠按2下)

原文:
The fix involves browsing to about:config and setting browser.tabs.remote.autostart2 to false. They mention setting browser.tabs.remote.autostart to false as well, but mine was already set.

參考
https://bbs.archlinux.org/viewtopic.php?id=223335
https://bugs.winehq.org/show_bug.cgi?id=42388