![無法連接到 Ubuntu 伺服器上的無線網絡](https://rvso.com/image/912779/%E7%84%A1%E6%B3%95%E9%80%A3%E6%8E%A5%E5%88%B0%20Ubuntu%20%E4%BC%BA%E6%9C%8D%E5%99%A8%E4%B8%8A%E7%9A%84%E7%84%A1%E7%B7%9A%E7%B6%B2%E7%B5%A1.png)
我嘗試安裝 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 的伺服器。請使用以太網,因為它更加穩定,並且系統會在啟動時透過軟體方式連接到互聯網。
我確信還有其他方法可以做你想做的事。但這兩個可能是最直接的解決方案。