問題描述
操作系統:Ubuntu Server 18.04 LTS
Ubuntu每次啟動時產生如下motd(message of today)輸出
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings // A
問題原因和分析
可能是網絡配置寫錯了,比如DNS寫錯了等,也可能是bug。
腳本/etc/update-motd.d/91-release-upgrade
運行的同時會簡介運行/usr/lib/ubuntu-release-upgrader/release-upgrade-motd
,從以下url下載文件meta-release-lts
https://changelogs.ubuntu.com/meta-release-lts
這個文件沒有登記bionic
的條目,沒有Ubuntu 18的記錄,但是Ubuntu上的程序沒有做出處理,於是產生A行輸出到/var/lib/ubuntu-release-upgrader/release-upgrade-available
。
通過cat命令看一下這個文件的內容。
root@localghost~# cat /var/lib/ubuntu-release-upgrader/release-upgrade-available
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings
解決方法
(1)移除/var/lib/ubuntu-release-upgrader/release-upgrade-available
root@localghost~#rm /var/lib/ubuntu-release-upgrader/release-upgrade-available
(2)運行/usr/lib/ubuntu-release-upgrader/release-upgrade-motd
root@localghost~#./usr/lib/ubuntu-release-upgrader/release-upgrade-motd
參考文章
https://askubuntu.com/questions/919441/failed-to-connect-to-http-changelogs-ubuntu-com-meta-release
https://ubuntuforums.org/showthread.php?t=2391641