ubuntu18.04.1离线包制作异常

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
LionOnLine
帖子: 2
注册时间: 2018-09-26 23:28
系统: window10

ubuntu18.04.1离线包制作异常

#1

帖子 LionOnLine » 2018-09-26 23:43

ubuntu18.04.1制作离线包制作离线包,无法使用错误
Get:1 file:/home packs/ InRelease
Ign:1 file:/home packs/ InRelease
Get:2 file:/home packs/ Release
Err:2 file:/home packs/ Release
File not found - /home/packs/Release (2: No such file or directory)
Reading package lists... Done
E: The repository 'file:/home packs/ 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.

制作方式
1.在联网的服务器上通过 sudo apt-get install命令安装所需的包
2.安装包缓存在本地的/var/cache/apt/archives目录下
3.创建新的目录,sudo mkdir /home/packs(目录可以自己制定)
4 拷贝目录/var/cache/apt/archives到/home/packs下
sudo cp -r /var/cache/apt/archives/* /home/packs
5.建立Packages.gz包,里面记录了packs文件夹下面的软件包信息,包括依赖信息。
dpkg-scanpackages packs /dev/null |gzip > packs/Packages.gz -r
6.将packs文件夹上传到离线服务器上,例如上传到/home下
7.修改配置文件sudo vi /etc/apt/sources.list,
添加如下内容
deb file:///home/ packs/
注意:packs前面有空格,后面有斜杠
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu18.04.1离线包制作异常

#2

帖子 poloshiao » 2018-09-27 7:51

创建新的目录,sudo mkdir /home/packs
你登入的 username 是 packs ?
如果不是 不建議如此安排

如果是參考網路上文章
請提供該文章網址
Get:1 file:/home packs/ InRelease
為何 packs 前面 及 InRelease 前面 有空格 ?
LionOnLine
帖子: 2
注册时间: 2018-09-26 23:28
系统: window10

Re: ubuntu18.04.1离线包制作异常

#3

帖子 LionOnLine » 2018-09-27 10:30

我是用root用户登录,参考的网站:https://blog.csdn.net/emtit2008/article/details/4659488
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: ubuntu18.04.1离线包制作异常

#4

帖子 TeliuTe » 2018-09-27 11:58

以前在12.04机房里用过,创建文件夹的时候建两层,离线包放在第二层(/ubuntu/ubuntu/),在第一层(/ubuntu/)下面运行 dpkg-scanpackages
参考: viewtopic.php?p=3036850#p3036850
回复