ubuntu:apt:add_local_directory_to_apt_sources.list
Differences
This shows you the differences between two versions of the page.
ubuntu:apt:add_local_directory_to_apt_sources.list [2023/06/18 14:06] – created peter | ubuntu:apt:add_local_directory_to_apt_sources.list [2023/06/18 14:09] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu - apt - Add local directory to apt sources.list ====== | ====== Ubuntu - apt - Add local directory to apt sources.list ====== | ||
+ | |||
+ | 1. Create the directory to put all the deb files, for example / | ||
+ | |||
+ | <code bash> | ||
+ | mkdir / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 2. Put all the deb files into the directory: | ||
+ | |||
+ | <code bash> | ||
+ | mv / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 3. Check the current priorities and section for the package, find entry named Section and Priority: | ||
+ | |||
+ | <code bash> | ||
+ | dpkg --info example_1.2.3-1@i386.deb | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | Here is some of the info: | ||
+ | |||
+ | < | ||
+ | Package: example | ||
+ | Section: editors | ||
+ | Priority: optional | ||
+ | Homepage: http:// | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 4. Create an override file. | ||
+ | |||
+ | An Override file is used to override the default Priority and Section setting of the package. | ||
+ | |||
+ | * An Override file contains 3 columns: Package, Priority, Section. | ||
+ | * Package is the name of the Package, Priority is low, medium, high or optional and Section is the section to which it belongs. | ||
+ | |||
+ | Example of override file content: | ||
+ | |||
+ | < | ||
+ | ## Override | ||
+ | #Package priority section | ||
+ | example low editors | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 5. Create Packages.gz inside / | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | sudo dpkg-scanpackages . override | gzip -c9 > Packages.gz | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 6. If you are too lazy to do the override file, you do not have to. Just change the "dpkg --scanpackages" | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | sudo dpkg-scanpackages . /dev/null | gzip -c9 > Packages.gz | ||
+ | </ | ||
+ | |||
+ | If you follow this path, ignore step 4 and 5. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 7. Add this line to / | ||
+ | |||
+ | < | ||
+ | deb file:/// | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 8. Re-synchronize the package index files from their sources | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get update | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | 9. Install your application: | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install example | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * apt will fetch the deb files from your local file directory also. | ||
+ | |||
+ | </ | ||
ubuntu/apt/add_local_directory_to_apt_sources.list.1687097189.txt.gz · Last modified: 2023/06/18 14:06 by peter