In the intranet environment, offline apt-get
source under ubuntu
.
apt-get
offline source#### Use the following command, the system will download the installation package to/var/cache/apt/under archives
sudo apt-get install -d <packages>
sudo mkdir /offline-apt-packages
sudo chmod -R 777/offline-apt-packages
sudo cp -r /var/cache/apt/archives /offline-apt-packages
sudo apt-get install -y dpkg-dev
cd /offline-apt-packages
sudo dpkg-scanpackages ./dev/null| gzip -9c > Packages.gz
sudo cp Packages.gz ./archives
cd /
sudo tar czvf offline-apt-packages.tar.gz offline-apt-packages.tar.gz
sudo tar zxvf offline-apt-packages.tar.gz -C /
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb file:///offline-apt-packages archives/"| sudo tee /etc/apt/sources.list
sudo apt-get updatesudo apt-get install -y <packages>
Recommended Posts