
我嘗試安裝 Ubuntu 18.04,並在嘗試安裝網路工具時遇到問題,錯誤訊息為:
failed to fetch archive.ubuntu/pool/main/w/wireless-tools/wireless-tools_30"pre9013ubuntu1_amd64.deb. Temporary failure resolving 'archive.ubuntu.com'
^ same thing again
unable to fetch some archives, maybe run apt-get update or try --fix missing
我apt-get update
當時就跑了:
Reloading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - Remove Caches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - Remove caches (13: Permission denied)
答案1
我以前曾經嘗試過這樣做,但確實很痛苦。我的建議是:
使用乙太網路線將您的 Ubuntu Server 安裝連接到互聯網,然後安裝您需要的內容(首選)
在單獨的機器上使用
apt download
並將所有必需的 *.deb 檔案下載到閃存驅動器上的資料夾中(確保記住依賴關係!),然後將其插入 Ubuntu 伺服器並運行sudo apt install /path/to/dir/*
並像這樣安裝它們。
一般來說,我不建議運行連接到 Wi-Fi 的伺服器。請使用以太網,因為它更加穩定,並且系統會在啟動時透過軟體方式連接到互聯網。
我確信還有其他方法可以做你想做的事。但這兩個可能是最直接的解決方案。