Linux安裝yum時出現(xiàn)apt-get?install?E:?無法定位軟件包問題解決
更新時間:2024年12月13日 10:58:08 作者:GeekPower極客力量
這篇文章主要介紹了Linux安裝yum時出現(xiàn)apt-get?install?E:?無法定位軟件包問題解決的相關資料,文中通過圖文介紹的非常詳細,對大家的學習或者工作具有一定的參考借鑒價值,需要的朋友可以參考下
ubuntu系統(tǒng)安裝mysql之前安裝yum,出現(xiàn)報錯:E: 無法定位軟件包問題

(1)找到源鏡像,備份
cd /etc/apt/ // 切換到/etc/apt/ 目錄下 sudo cp sources.list sources.list.old // 先把源文件復制到sources.list.old,備份

(2)編輯sources.list文件
sudo vim sources.list
vim使用:
- vim全選,全部復制,全部刪除
- 全選(高亮顯示):按esc后,然后ggvG或者ggVG
- 全部復制:按esc后,然后ggyG
- 全部刪除:按esc后,然后dG
輸入i進入編輯模式。
我們將原有的文件進行全部刪除,替換為新的內容,使用國內的服務器。
替換為以下內容:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
輸入esc退出編輯模式,進入命令模式。再輸入冒號“:”進入底線模式,輸入wq,退出并保存。

(3)更新軟件信息:
sudo apt-get update

更新成功

(4)下載yum
sudo apt-get install ...

(5)測試是否安裝成功
yum -version

總結
到此這篇關于Linux安裝yum時出現(xiàn)apt-get install E: 無法定位軟件包問題解決的文章就介紹到這了,更多相關Linux安裝yum出現(xiàn)apt-get install E內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Centos 6.8編譯安裝LNMP環(huán)境(Nginx+MySQL+PHP)教程
這篇文章主要介紹了關于CentOS 6.8中編譯安裝LNMP環(huán)境的相關資料,LNMP即Linux,Nginx,MySQL,PHP,文中通過一步步的步驟介紹的非常詳細,需要的朋友可以參考借鑒,下面來一起看看吧。2017-03-03
Apache shiro的簡單介紹與使用教程(與spring整合使用)
Apache Shiro是一個強大而靈活的開源安全框架,它能夠干凈利落地處理身份認證,授權,企業(yè)會話管理和加密這篇文章給大家介紹了Apache shiro的簡單介紹與使用教程(與spring整合使用),感興趣的朋友一起看看吧2017-10-10

