Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to make the local source of Ubuntu Linux operating system

Shulou Source: shulou.com Published: 2022-06-01 06:25:28 11月11日 Update

This article mainly introduces how to make the local source of Ubuntu Linux operating system, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.

There are two types of packages in the packs folder: deb packages (all dependencies and packages), Packages.gz focuses on the second type of package: this package contains the required package list and dependency information.

This package is post-generated and is generated by the following command:

sudo dpkg-scanpackages packs /dev/null |gzip > packages/Packages.gz ###packages is the folder that contains all packages. This command is executed one level above the pakcs folder. Packages.gz is generated in the packages folder.

The requested URL/var/cache/apt/archives/was not found on this server.

Command:

sudo cp ~/packs/*.deb /var/cache/apt/archives/

sudo chmod 777 -R /var/cache/apt/archives/

2. Create such a directory under the/media directory:

Create gutsy, create packs under gutsy ###Note all folders

Copy Packages.gz to packages and put permissions.

Command:

sudo mkdir /media/gutsy

sudo mkdir /media/gutsy/packs

sudo cp ~/Packages.gz /media/packs/

sudo chmod 777 -R /media/gutsy/

sudo chmod 777 -R /var/cache/apt/archives/

After completing the above tasks, execute the following command:

3.sudo gedit /etc/apt/sources.list

After entering the sources.list file, empty the contents of the file and fill in the following line:

deb file:///media/gutsy packs/

After completing these three steps, the production of the local source is complete.

implementation

sudo apt-get update

After sudo apt-get dist-upgrade, everything is normal.

sudo apt-get install XXX ###Install whatever packages you need, provided they are available locally.

Note: If your local source is still being refined and some packages need to be updated and added continuously, in order not to delay your own use, if you can connect to the external network, you can use the following two sets of apt sources as supplements:

deb http://debian.ustc.edu.cn/ubuntu/ gutsy main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse

deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy main restricted universe multiverse

deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse

deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse

deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse

deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse

command

sudo gedit /etc/apt/sources.list

Add the above two sets of sources to the sources.list file, save, and exit.

sudo apt-get update

sudo apt-get dist-upgrade

Thank you for reading this article carefully. I hope that the article "How to Make a Local Source of Ubuntu Linux Operating System" shared by Xiaobian will help everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Tags: Files commands folders production directories articles software software packages facets operating systems systems copies types work generation one line continuous value information interests Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia MariaDB MySQL Microsoft