how_to_obtain_packages_using_apt
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to_obtain_packages_using_apt [2022/07/19 20:13] – external edit 127.0.0.1 | how_to_obtain_packages_using_apt [2022/07/22 18:06] (current) – admin | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== APT (Advanced Packaging Tool) ===== | ===== APT (Advanced Packaging Tool) ===== | ||
====About APT==== | ====About APT==== | ||
- | APT provides an effective way of installing packages and programs. Default settings are created and in some cases default users are created for managing the services and/or programs. APT handles all shared modules, dependencies and libraries of tools. When installing a program via APT - the default locations within Linux (Debian) should be consulted.<br>The following directories are where files are stored after APT - and are mostly default:<br> | + | APT provides an effective way of installing packages and programs. Default settings are created and in some cases default users are created for managing the services and/or programs. APT handles all shared modules, dependencies and libraries of tools. When installing a program via APT - the default locations within Linux (Debian) should be consulted. The following directories are where files are stored after APT - and are mostly default: |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | <br> | + | |
====General Use:==== | ====General Use:==== | ||
To download Updates and All Package Information for Debian Sarge | To download Updates and All Package Information for Debian Sarge | ||
- | **apt-get update** | + | < |
+ | apt-get update | ||
+ | </ | ||
To upgrade All Packages and Sources | To upgrade All Packages and Sources | ||
- | **apt-get upgrade** and/or | + | < |
- | **apt-get install** | + | apt-get upgrade |
+ | #and/or | ||
+ | apt-get install | ||
+ | </ | ||
To Install an Individual Package | To Install an Individual Package | ||
- | **apt-get install package** | + | < |
+ | apt-get install package | ||
+ | </ | ||
To Remove an Individual Package | To Remove an Individual Package | ||
- | **apt-get remove package** | + | < |
+ | apt-get remove package | ||
+ | </ | ||
To Show Information on a Particular Package | To Show Information on a Particular Package | ||
- | **apt-cache show package** | + | < |
+ | apt-cache show package | ||
+ | </ | ||
To Search for New Packages (apart from web search) | To Search for New Packages (apart from web search) | ||
- | **apt-cache search package** | + | < |
+ | apt-cache search package | ||
+ | </ | ||
APT runs ontop of dpkg (front end) - a Package Manager | APT runs ontop of dpkg (front end) - a Package Manager | ||
To List Packages and perform more detailed operations: | To List Packages and perform more detailed operations: | ||
- | **dpkg -l** or | + | < |
- | **dpkg -l | grep package**< | + | dpkg -l |
- | <br> | + | #or |
+ | dpkg -l | grep package | ||
+ | </code> | ||
====Problems with APT==== | ====Problems with APT==== | ||
- | Even though APT is meant to provide an effective way to install packages etc., problems were experienced. Problems arose due to incorrect apt-get installing in the beginning and also due to suggests etc. with mail.<br> | + | Even though APT is meant to provide an effective way to install packages etc., problems were experienced. Problems arose due to incorrect apt-get installing in the beginning and also due to suggests etc. with mail. |
- | Pine was initially installed. Postfix and Courier were installed then. Pine suddenly dropped off, or was uninstalled due to dependancies & incomplete knowledge of what was happening. Care MUST be taken with apt. What was done in this case to fix pine, was to download a .deb package from the pine homepage. It was installed via:<br> | + | |
- | dpkg -i package.deb <br>Another related problem is the fact that Horde does not want to install via apt-get after Mailserver install and config.< | + | |
- | //edit: Dont know if pine is available via apt-get due to licencing issues// | + | Pine was initially installed. Postfix and Courier were installed then. Pine suddenly dropped off, or was uninstalled due to dependancies & incomplete knowledge of what was happening. Care MUST be taken with apt. What was done in this case to fix pine, was to download a .deb package from the pine homepage. It was installed via: |
- | ---- | + | |
+ | <code> | ||
+ | dpkg -i package.deb | ||
+ | </code> | ||
+ | |||
+ | Another related problem is the fact that Horde does not want to install via apt-get after Mailserver install and config. | ||
====Config for APT==== | ====Config for APT==== | ||
- | apt config is located at: /etc/apt<br> | + | apt config is located at: /etc/apt |
1. The following is required if using a proxy server to access the internet: | 1. The following is required if using a proxy server to access the internet: | ||
- | **apt.conf** (May have to write a new file) | + | < |
+ | vi /etc/apt/apt.conf (May have to write a new file) | ||
| | ||
+ | </ | ||
2. To obtain apt packages fast from the nearest mirror (should be done from initial set-up) sources.list can be edited. It is also determined whether to use " | 2. To obtain apt packages fast from the nearest mirror (should be done from initial set-up) sources.list can be edited. It is also determined whether to use " | ||
- | **sources.list** (Should be OK as is) | + | < |
- | deb http:// | + | sources.list (Should be OK as is) |
- | | + | deb http:// |
+ | deb-src http:// | ||
+ | </ | ||
- | Instead of Configuring Step 1. for using a Proxy server, an environment variable can also be set. This is useful if using links or a text based browser.< | + | Instead of Configuring Step 1. for using a Proxy server, an environment variable can also be set. This is useful if using links or a text based browser. |
+ | <code> | ||
< | < | ||
+ | </ | ||
==== Apt Pinning (installing stable and testing packages together)==== | ==== Apt Pinning (installing stable and testing packages together)==== | ||
+ | |||
The following is taken from an excellent article on this: | The following is taken from an excellent article on this: | ||
http:// | http:// | ||
Include both stable and testing sources to / | Include both stable and testing sources to / | ||
+ | < | ||
vi / | vi / | ||
Line 81: | Line 112: | ||
Pin: release a=unstable | Pin: release a=unstable | ||
| | ||
+ | </ | ||
Thats it. | Thats it. | ||
+ | < | ||
| | ||
| | ||
#or | #or | ||
| | ||
+ | </ | ||
===== dpkg - Debian Package Manager ===== | ===== dpkg - Debian Package Manager ===== | ||
Line 92: | Line 125: | ||
==== Install a .deb package manually ==== | ==== Install a .deb package manually ==== | ||
+ | < | ||
dpkg -i package.deb | dpkg -i package.deb | ||
- | < | + | #generally the .deb can be downloaded from debian.org |
+ | </ | ||
==== Find where a package installs itself ==== | ==== Find where a package installs itself ==== | ||
+ | < | ||
dpkg -L package | dpkg -L package | ||
+ | </ | ||
+ | |||
+ | ==== Remove / Uninstall a package ==== | ||
+ | < | ||
+ | apt-get remove package | ||
+ | #OR | ||
+ | apt-get purge package | ||
+ | #The latter removes and purges all config files. | ||
+ | #Note after removing the one package, extra ones which were installed at the time will remain. To remove them also: | ||
+ | apt autoremove | ||
+ | </ | ||
===== APT Guru Tricks ===== | ===== APT Guru Tricks ===== | ||
Taken from: http:// | Taken from: http:// | ||
+ | < | ||
dpkg -S / | dpkg -S / | ||
# | # | ||
Line 110: | Line 157: | ||
echo " | echo " | ||
#both these do the same thing, i.e. prevent a package from been updated. | #both these do the same thing, i.e. prevent a package from been updated. | ||
+ | </ |
how_to_obtain_packages_using_apt.1658261599.txt.gz · Last modified: 2022/07/19 20:13 by 127.0.0.1