Ubuntu20.04更換阿里云源后安裝軟件都會(huì)報(bào)錯(cuò):The following packages have unmet dependencies
查看資料,大概是ubuntu本身的源比較版本較老,而阿里云的源比較新,因此版本不匹配造成依賴的庫(kù)不匹配,所以只要將阿里云的源換回Ubuntu官方源
1,替換源:
Ubuntu 的軟件源配置文件是 /etc/apt/sources.list
使用指令:
sudo vim /etc/apt/sources.list
然后將下面的源拷貝過(guò)去:
Ubuntu20.04LTS的清華大學(xué)源如下:
# 默認(rèn)注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 預(yù)發(fā)布軟件源,不建議啟用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
如下所示:
2,更新源
更新本地軟件源列表:
sudo apt-get update
根據(jù)剛才更新的軟件源更新本地軟件庫(kù):
sudo apt-get upgrade
然后可以正常安裝了。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-670989.html
如果還是不能解決你的問(wèn)題,有可能是其他的問(wèn)題??梢栽偎阉选?span toymoban-style="hidden">文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-670989.html
到了這里,關(guān)于Ubuntu20.04安裝軟件報(bào)錯(cuò):The following packages have unmet dependencies的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!