本地 apt-mirror 未找到软件包

本地 apt-mirror 未找到软件包

我正在尝试在本地服务器上设置 Ubuntu 软件包的镜像,以便在长时间不连接到互联网的本地网络上使用。我遵循了几个网站上的说明,主要是这个,显示了如何使用 apt-mirror 执行此操作。我相信我已经正确设置了服务器。它下载了 Gb 的数据并说它成功了。然后我设置了一个 nginx 服务器,我可以使用我的 ip 地址访问该站点并查看文件夹以及 dists 和 pool 文件夹。dists 包含 bionic 文件夹。然后我修改了客户端计算机上的 /etc/apt/sources.list 文件,并将其更改为指向我的服务器的 ip 地址,而不是 ubuntu 存档站点。现在它看起来像这样:

# deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://192.168.10.118/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://192.168.10.118/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://192.168.10.118/ubuntu/ bionic universe
deb http://192.168.10.118/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://192.168.10.118/ubuntu/ bionic multiverse
deb http://192.168.10.118/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://192.168.10.118/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://192.168.10.118/ubuntu bionic-security main restricted
deb http://192.168.10.118/ubuntu bionic-security universe
deb http://192.168.10.118/ubuntu bionic-security multiverse

我在下载之前还修改了 mirror.list 文件以提取 bionic,在我的 dists 文件夹中 bionic 就在那里,并且充满了软件包。然后我运行 sudo apt-get update 并得到了以下输出:

sudo apt-get update
Get:1 http://192.168.10.118/ubuntu bionic InRelease [242 kB]                   
Get:2 http://192.168.10.118/ubuntu bionic-updates InRelease [88.7 kB]          
Get:3 http://192.168.10.118/ubuntu bionic-backports InRelease [74.6 kB]        
Get:4 http://192.168.10.118/ubuntu bionic-security InRelease [83.2 kB]         
Ign:5 http://192.168.10.118/ubuntu bionic/main i386 Packages                   
Get:6 http://192.168.10.118/ubuntu bionic/main amd64 Packages [1,019 kB]       
Get:7 http://192.168.10.118/ubuntu bionic/main Translation-en [516 kB]         
Get:8 http://192.168.10.118/ubuntu bionic/main amd64 DEP-11 Metadata [477 kB]  
Get:9 http://192.168.10.118/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]     
Get:10 http://192.168.10.118/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]    
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Hit:14 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease         
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Ign:33 http://dl.google.com/linux/chrome/deb stable InRelease                  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Get:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages [9,156 B]  
Ign:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages            
Ign:43 http://192.168.10.118/ubuntu bionic/universe i386 Packages              
Ign:44 http://192.168.10.118/ubuntu bionic/multiverse i386 Packages            
Ign:5 http://192.168.10.118/ubuntu bionic/main i386 Packages                   
Ign:45 http://192.168.10.118/ubuntu bionic-updates/main i386 Packages          
Ign:46 http://192.168.10.118/ubuntu bionic-updates/restricted i386 Packages    
Ign:47 http://192.168.10.118/ubuntu bionic-updates/universe i386 Packages      
Ign:48 http://192.168.10.118/ubuntu bionic-updates/multiverse i386 Packages    
Get:49 http://dl.google.com/linux/chrome/deb stable Release [943 B]            
Get:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages [2,852 B]
Get:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages [2,852 B]
Get:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages [2,852 B]
Get:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages [2,852 B]
Get:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages [2,852 B]
Ign:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages   
Ign:56 http://192.168.10.118/ubuntu bionic-backports/universe i386 Packages    
Ign:57 http://192.168.10.118/ubuntu bionic-backports/universe Translation-en   
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,104 B]
Ign:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata
Ign:66 http://192.168.10.118/ubuntu bionic-backports/universe DEP-11 48x48 Icons
Ign:67 http://192.168.10.118/ubuntu bionic-backports/universe DEP-11 64x64 Icons
Ign:68 http://192.168.10.118/ubuntu bionic-security/main i386 Packages       
Ign:69 http://192.168.10.118/ubuntu bionic-security/universe i386 Packages   
Ign:70 http://192.168.10.118/ubuntu bionic-security/multiverse i386 Packages
Ign:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages      
Ign:43 http://192.168.10.118/ubuntu bionic/universe i386 Packages        
Ign:44 http://192.168.10.118/ubuntu bionic/multiverse i386 Packages      
Ign:5 http://192.168.10.118/ubuntu bionic/main i386 Packages             
Ign:45 http://192.168.10.118/ubuntu bionic-updates/main i386 Packages    
Ign:46 http://192.168.10.118/ubuntu bionic-updates/restricted i386 Packages
Ign:47 http://192.168.10.118/ubuntu bionic-updates/universe i386 Packages
Ign:48 http://192.168.10.118/ubuntu bionic-updates/multiverse i386 Packages
Get:71 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]  
Ign:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages   
Ign:56 http://192.168.10.118/ubuntu bionic-backports/universe i386 Packages    
Ign:57 http://192.168.10.118/ubuntu bionic-backports/universe Translation-en
Ign:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata
Ign:66 http://192.168.10.118/ubuntu bionic-backports/universe DEP-11 48x48 Icons
Ign:67 http://192.168.10.118/ubuntu bionic-backports/universe DEP-11 64x64 Icons
Ign:68 http://192.168.10.118/ubuntu bionic-security/main i386 Packages         
Ign:69 http://192.168.10.118/ubuntu bionic-security/universe i386 Packages     
Ign:70 http://192.168.10.118/ubuntu bionic-security/multiverse i386 Packages   
Ign:11 http://192.168.10.118/ubuntu bionic/restricted i386 Packages            
Ign:43 http://192.168.10.118/ubuntu bionic/universe i386 Packages              
Ign:44 http://192.168.10.118/ubuntu bionic/multiverse i386 Packages         
Err:5 http://192.168.10.118/ubuntu bionic/main i386 Packages                
404  Not Found [IP: 192.168.10.118 80]
Ign:45 http://192.168.10.118/ubuntu bionic-updates/main i386 Packages       
Ign:46 http://192.168.10.118/ubuntu bionic-updates/restricted i386 Packages
Ign:47 http://192.168.10.118/ubuntu bionic-updates/universe i386 Packages
Ign:48 http://192.168.10.118/ubuntu bionic-updates/multiverse i386 Packages
Ign:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages
Ign:56 http://192.168.10.118/ubuntu bionic-backports/universe i386 Packages
Ign:57 http://192.168.10.118/ubuntu bionic-backports/universe Translation-en
Ign:58 http://192.168.10.118/ubuntu bionic-backports/universe amd64 DEP-11 Metadata
Err:66 http://192.168.10.118/ubuntu bionic-backports/universe DEP-11 48x48 Icons
404  Not Found [IP: 192.168.10.118 80]
Ign:67 http://192.168.10.118/ubuntu bionic-backports/universe DEP-11 64x64 Icons
Ign:68 http://192.168.10.118/ubuntu bionic-security/main i386 Packages      
Ign:69 http://192.168.10.118/ubuntu bionic-security/universe i386 Packages  
Ign:70 http://192.168.10.118/ubuntu bionic-security/multiverse i386 Packages
Err:45 http://192.168.10.118/ubuntu bionic-updates/main i386 Packages       
404  Not Found [IP: 192.168.10.118 80]
Ign:46 http://192.168.10.118/ubuntu bionic-updates/restricted i386 Packages 
Ign:47 http://192.168.10.118/ubuntu bionic-updates/universe i386 Packages   
Ign:48 http://192.168.10.118/ubuntu bionic-updates/multiverse i386 Packages 
Ign:50 http://192.168.10.118/ubuntu bionic-backports/universe amd64 Packages
Ign:56 http://192.168.10.118/ubuntu bionic-backports/universe i386 Packages 
Err:68 http://192.168.10.118/ubuntu bionic-security/main i386 Packages      
404  Not Found [IP: 192.168.10.118 80]
Ign:69 http://192.168.10.118/ubuntu bionic-security/universe i386 Packages  
Ign:70 http://192.168.10.118/ubuntu bionic-security/multiverse i386 Packages
Reading package lists... Done                                                  
E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

所以它在镜像中找到了软件包。我有点担心 Ign:XX。我不确定这是否意味着它忽略了它?当我真正尝试安装像 git 这样的基本程序时,它失败了。

sudo apt-get install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'git' has no installation candidate


sudo apt-get install git-gui
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package git-gui

我尝试安装了一些基本软件包,但到目前为止,我总是收到相同的消息,说找不到它。有人知道这里可能出了什么问题吗,或者我可以尝试找出如何解决这个问题?

答案1

问题一:

如果你查看修改后的 mirror.list 的底部,会发现这行有问题:

   E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC' 

我刚刚遇到了同样的问题,这很容易解决。发生这种情况是因为拥有 APT 存储库的公司已将其名称从 Google Inc 更改为 Google LLC。打开终端并输入:

sudo apt update

然后,系统将提示您接受存储库的新来源:

Do you want to accept these changes and continue updating from this repository? [y/N]

输入“y”就可以了。就是这样。

问题二:

看看是否存在:

/etc/apt/apt.conf.d/50appstream

如果存在,则需要像这样删除:

sudo rm /etc/apt/apt.conf.d/50appstream

下一个

可能需要将架构添加到 sources.list 中,类似以下示例:

deb [arch=amd64] file:/wherever ubuntu bionic main restricted universe multiverse ...etc.

更新现在应该可以生效了。

相关内容