将端口添加到 sources.list

将端口添加到 sources.list

我已手动将以下源添加到/etc/apt/sources.list文件中

deb http://ports.ubuntu.com/ubuntu eoan main

我已完成此操作以获取armhf目标的一些软件包(具体来说,是 libssl-dev:armhf 软件包)。但当我这样做时apt-get update,我发现程序无法找到发布文件。以下是日志。

...
Ign:18 http://archive.ubuntu.com/ubuntu eoan-security/main armhf Packages                                             
Ign:19 http://archive.ubuntu.com/ubuntu eoan-security/universe armhf Packages                                         
Err:7 http://archive.ubuntu.com/ubuntu eoan/main armhf Packages                                                       
  404  Not Found [IP: 2001:67c:1562::18 80]
Ign:12 http://archive.ubuntu.com/ubuntu eoan/restricted armhf Packages                                                
Ign:13 http://archive.ubuntu.com/ubuntu eoan/universe armhf Packages                                                  
Ign:14 http://archive.ubuntu.com/ubuntu eoan/multiverse armhf Packages                                                
Err:15 http://archive.ubuntu.com/ubuntu eoan-updates/main armhf Packages                                              
  404  Not Found [IP: 2001:67c:1562::18 80]
Ign:16 http://archive.ubuntu.com/ubuntu eoan-updates/universe armhf Packages                                          
Err:17 http://archive.ubuntu.com/ubuntu eoan-backports/universe armhf Packages                                        
  404  Not Found [IP: 2001:67c:1562::18 80]
Err:18 http://archive.ubuntu.com/ubuntu eoan-security/main armhf Packages                                             
  404  Not Found [IP: 2001:67c:1562::18 80]
Ign:19 http://archive.ubuntu.com/ubuntu eoan-security/universe armhf Packages                                         
Reading package lists... Done                                                                                         
E: The repository 'http://ports.ubuntu.com/ubuntu eoan Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

我查看了此处的端口文件夹:http://ports.ubuntu.com/dists/eoan/,我可以看到发布文件在那里。可能是什么问题?这是我拥有的外国架构列表。

subin@linux:~$ dpkg --print-foreign-architectures
i386
armhf

答案1

如果你想易于找到http://ports.ubuntu.com/dists/eoan/,您需要将行中的 URL 更改为http://ports.ubuntu.com/。 IE:

deb http://ports.ubuntu.com/ ubuntu eoan main

答案2

请参阅这个答案:

Apt 在 Ubuntu 20.04 arm64(Raspberry Pi 4)上找不到软件包

添加这些行时,将“arm64”替换为“armhf”。

相关内容