在ubuntu20.04下解决:E: 无法定位软件包 mingw32 的问题

解决:E: 无法定位软件包 mingw32 的问题
百度搜索:ubuntu E: 无法定位软件包 mingw32

https://blog.csdn.net/asia66/article/details/85263250
E.无法定位安装包mingw32

原创asia66
最后发布于2018-12-26 15:45:23
阅读数 1521  收藏
展开

一般安装包无法定位是安装源的问题,ubuntu中直接 sudo apt-get update即可

但是在ubuntu中安装mingw32时,却报错 无法定位安装包
此时需要打开下载源文件sources.list 即
sudo gedit /etc/apt/sources.list

在sources.list末尾添加语句并保存退出
deb http://us.archive.ubuntu.com/ubuntu trusty main universe


再次更新安装即可
sudo apt-get update
sudo apt-get install mingw32

百度搜索:ubuntu sources.list 增加行
https://www.kutu66.com//ubuntu/article_160112
如何在/etc/apt/sources.list 中添加一行?

问题:
我在更新我的它的状态是:

不要使用ubuntu中的软件包。 你需要先设置我们的软件包库,然后才能获取 Tor。

然后,我必须将这一行添加到你的/etc/apt/sources.list file: 中
deb http://deb.torproject.org/torproject.org <precise> main


我不确定如何向 /etc/apt/sources.list 添加一行。

回答 1:
创建当前 sources.list 文件的备份副本
sudo cp/etc/apt/sources.list/etc/apt/sources.list.bak


附加 new line of text 到当前 sources.list 文件
echo"new line of text" | sudo tee -a/etc/apt/sources.list


rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ sudo apt-get install mingw32
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
E: 无法定位软件包 mingw32
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ cd /etc/apt
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ ll
总用量 40
drwxr-xr-x   7 root root  4096 2月   7 20:04 ./
drwxr-xr-x 132 root root 12288 2月   7 20:58 ../
drwxr-xr-x   2 root root  4096 2月   7 20:51 apt.conf.d/
drwxr-xr-x   2 root root  4096 1月  16 19:13 auth.conf.d/
drwxr-xr-x   2 root root  4096 1月  16 19:13 preferences.d/
-rw-rw-r--   1 root root  3154 2月   7 20:04 sources.list
drwxr-xr-x   2 root root  4096 1月  16 19:13 sources.list.d/
drwxr-xr-x   2 root root  4096 1月  24 15:33 trusted.gpg.d/
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ sudo cp sources.list sources.list.bak1
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ echo "deb http://us.archive.ubuntu.com/ubuntu trusty main universe" | sudo tee -a /etc/apt/sources.listdeb http://us.archive.ubuntu.com/ubuntu trusty main universe
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ diff sources.list sources.list.bak1 
58d57
< deb http://us.archive.ubuntu.com/ubuntu trusty main universe
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ 
rootroot@rootroot-E400:/etc/apt$ cd ~
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ sudo apt-get update
忽略:1 http://us.archive.ubuntu.com/ubuntu trusty InRelease                                                                            
命中:2 http://cn.archive.ubuntu.com/ubuntu focal InRelease                                                                             
命中:3 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:4 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
获取:5 http://us.archive.ubuntu.com/ubuntu trusty Release [58.5 kB]
命中:6 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease
获取:7 http://us.archive.ubuntu.com/ubuntu trusty Release.gpg [933 B]
获取:8 http://59.80.44.46/us.archive.ubuntu.com/202002072106/138CCCCBA04DC68606D6132B0BC1D9E5/ubuntu trusty/main amd64 Packages [1,350 kB]
获取:9 http://59.80.44.47/us.archive.ubuntu.com/202002072104/254B649A42F4B2AD18459D42954F0C67/ubuntu trusty/main i386 Packages [1,348 kB]
获取:10 http://59.80.44.48/us.archive.ubuntu.com/202002072106/F90FD53A0BBB5F5A8C7C56FED636F500/ubuntu trusty/universe i386 Packages [5,866 kB]
获取:11 http://59.80.44.45/us.archive.ubuntu.com/202002072105/7246882DB1D04081995D992F78A81B08/ubuntu trusty/universe amd64 Packages [5,859 kB]
已下载 14.5 MB,耗时 13秒 (1,126 kB/s)                                                                                                                                                                                                                                       
正在读取软件包列表... 完成
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ sudo apt-get install mingw32
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  python3-asn1crypto
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
  mingw32-binutils mingw32-runtime
建议安装:
  gcc-doc cpp-doc
下列【新】软件包将被安装:
  mingw32 mingw32-binutils mingw32-runtime
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 57 个软件包未被升级。
需要下载 27.1 MB 的归档。
解压缩后会消耗 206 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://us.archive.ubuntu.com/ubuntu trusty/universe amd64 mingw32-binutils amd64 2.20-0.2ubuntu1 [2,033 kB]
获取:2 http://us.archive.ubuntu.com/ubuntu trusty/universe amd64 mingw32-runtime all 3.15.2-0ubuntu1 [2,084 kB]
获取:3 http://us.archive.ubuntu.com/ubuntu trusty/universe amd64 mingw32 amd64 4.2.1.dfsg-2ubuntu1 [23.0 MB]
已下载 27.1 MB,耗时 11秒 (2,501 kB/s)                                                                                                                                                                                                                                       
正在选中未选择的软件包 mingw32-binutils。
(正在读取数据库 ... 系统当前共安装有 162059 个文件和目录。)
准备解压 .../mingw32-binutils_2.20-0.2ubuntu1_amd64.deb  ...
正在解压 mingw32-binutils (2.20-0.2ubuntu1) ...
正在选中未选择的软件包 mingw32-runtime。
准备解压 .../mingw32-runtime_3.15.2-0ubuntu1_all.deb  ...
正在解压 mingw32-runtime (3.15.2-0ubuntu1) ...
正在选中未选择的软件包 mingw32。
准备解压 .../mingw32_4.2.1.dfsg-2ubuntu1_amd64.deb  ...
正在解压 mingw32 (4.2.1.dfsg-2ubuntu1) ...
正在设置 mingw32-binutils (2.20-0.2ubuntu1) ...
正在设置 mingw32-runtime (3.15.2-0ubuntu1) ...
正在设置 mingw32 (4.2.1.dfsg-2ubuntu1) ...
正在处理用于 install-info (6.7.0.dfsg.2-5) 的触发器 ...
正在处理用于 man-db (2.9.0-2) 的触发器 ...
rootroot@rootroot-E400:~$ 
rootroot@rootroot-E400:~$ 

发布了141 篇原创文章 · 获赞 18 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/wb4916/article/details/104216010