=====================================================================
配置:
lenovo
product: 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
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