创建本地APT仓库
在搭建EAIBot机器人平台开发环境时,因为联网不方便,所以想先下载相关的deb包,然后使用dpkg离线安装。
结果,没想到居然有那么多的deb包需要安装;这要用dpkg安装,解决依赖问题不得累死个人。然后查了一下用apt如何离线安装,发现可以创建一个本地的jianrepository,就可以在没网的情况下使用apt安装了。
适用环境:ubuntu 16.04
下载deb包
$sudo rm /var/cache/apt/archives/*.deb # 先删除以前apt下载的deb包
$sudo apt -d install pkg_name # 下载要安装的包及其依赖
# 将下载的deb包拷贝到~/repos目录下
$mkdir ~/repos
$cp /var/cache/apt/archives/*.deb ~/repos
使用gpg生成秘钥,Release的签名
$gpg --gen-key
gpg (GnuPG) 1.4.20; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
请选择您要使用的密钥种类:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (仅用于签名)
(4) RSA (仅用于签名)
您的选择?