2023-10-03 Ubuntu誤刪包導(dǎo)致的一系列問題

  1. 安裝一些包時(shí)總有報(bào)錯(cuò)信息 Unable to correct problems, you have held broken packages. 人家說安裝aptitude包,用aptitude來安裝包就能夠自動(dòng)處理各種依賴項(xiàng),但是用這個(gè)包來安裝包時(shí),看似包安裝上了,其實(shí)根本沒有安裝上,于是尋求了其他方法。
    首先換源,因?yàn)閁buntu是22.04版,所以要搜索該版本的源,把/etc/apt/sources.list里面的內(nèi)容換成
# 中科大源,挺快的
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

然后執(zhí)行sudo apt-get updatesudo apt-get upgrade更新之后,就可以用apt/apt-get正常安裝包了。

  1. ifconfig命令發(fā)現(xiàn)只有l(wèi)o網(wǎng)卡,沒有ens33網(wǎng)卡,無法上網(wǎng)。首先找到一個(gè)教程,使用sudo dhclient ens33命令就可以正常上網(wǎng)了,但是每次重啟后都得配置一下。然后尋找其他辦法,發(fā)現(xiàn)是需要設(shè)置NetworkManager服務(wù)開機(jī)自啟動(dòng),即執(zhí)行命令sudo systemctl enable NetworkManager.service就夠了。參考:https://blog.csdn.net/MEREDITH5948/article/details/130657098
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容