您的位置:首页 > 其它

ubuntu下使用本地软件包APT

2014-07-16 10:32 204 查看
=====================================================================配置:lenovoproduct: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
64 bits
8G内存OS:Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)======================================================================公司搭建了一些编译服务器,这些服务器平常事不连接外网,只限于局域网内,时常有安装新软件的需求。去Ubuntu packages 下载下来后使用dpkg -i 安装,但是有时候需要一些依赖,容易出错,于是在source.list中添加本。

1.创建本地包目录:
mkdir -p /var/cache/apt/localdeb
2.添加source.list precise就是ubuntu 12.04的版本
mv sources.list sources.list.net
vim sources.list.local
#use local deb
#ln -s sources.list.net sources.list
#use initnet
#ln -s sources.list.local sources.list

deb file:///var/cache/apt/localdeb precise main
3. 使用软连接添加本地源为默认使用源
ln -s sources.list.local sources.list
好了,试试安装

/etc/apt# apt-get install gitweb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gitweb 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
However the following packages replace it:
git

E: Package 'gitweb' has no installation candidate


本文出自 “衰人有里” 博客,请务必保留此出处http://npjocj.blog.51cto.com/826225/1438863
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: