meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:general:apt [2015/07/01 07:48] – niziak | linux:general:apt [2021/09/26 07:47] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== APT ====== | ====== APT ====== | ||
| - | ===== playing | + | ===== Configuration ===== |
| + | |||
| + | ==== Force IPv4 ==== | ||
| + | |||
| + | <code bash> | ||
| + | echo ' | ||
| + | </ | ||
| + | |||
| + | ==== Limit download speed === | ||
| + | To limit download speed to 250kBytes/ | ||
| + | |||
| + | <file python / | ||
| + | Acquire | ||
| + | { | ||
| + | | ||
| + | | ||
| + | { | ||
| + | Dl-Limit " | ||
| + | }; | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ==== Use apt-cacher ==== | ||
| + | <file | / | ||
| + | Acquire:: | ||
| + | Acquire:: | ||
| + | </ | ||
| + | or | ||
| + | Replace all mirror hostnames with cachinghost/ | ||
| + | < | ||
| + | |||
| + | should now become: | ||
| + | < | ||
| + | |||
| + | ====== Commandline ====== | ||
| + | |||
| + | ===== Disable fsync ===== | ||
| + | |||
| + | This trick helps on BTRFS FS | ||
| + | <code bash> | ||
| + | apt-get install eatmydata | ||
| + | eatmydata apt-get update | ||
| + | </ | ||
| + | |||
| + | Or wrap some commands permanently with eatmydata | ||
| + | <code bash> | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | </ | ||
| + | |||
| + | ===== Playing | ||
| <code bash> | <code bash> | ||
| Line 19: | Line 70: | ||
| </ | </ | ||
| + | <code bash> | ||
| + | apt-get update 2> / | ||
| + | </ | ||
| + | ===== List all package versions ===== | ||
| + | |||
| + | <code bash> | ||
| + | < | ||
| + | lxc: | ||
| + | Installed: 1: | ||
| + | Candidate: 1:1.1.5-1 | ||
| + | Version table: | ||
| + | | ||
| + | 500 http:// | ||
| + | *** 1: | ||
| + | 100 / | ||
| + | |||
| + | </ | ||
| ===== Install specified version ===== | ===== Install specified version ===== | ||
| Line 25: | Line 93: | ||
| apt-mark hold backupninja | apt-mark hold backupninja | ||
| </ | </ | ||
| + | |||
| + | ===== Install with low prio questions ===== | ||
| + | To change dpkg-configure question priorities: | ||
| + | <code bash> | ||
| + | |||
| + | ===== Install from backports ===== | ||
| + | List version and priorities: | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | |||
| + | <file | / | ||
| + | Package: * | ||
| + | Pin: release a=jessie-backports | ||
| + | Pin-Priority: | ||
| + | |||
| + | Package: * | ||
| + | Pin: release a=stretch-backports | ||
| + | Pin-Priority: | ||
| + | </ | ||
| + | |||
| + | ===== Hold package ===== | ||
| + | <code bash> | ||
| + | |||
| + | |||
| + | ====== Errors ====== | ||
| + | |||
| + | ===== trying to overwrite | ||
| + | < | ||
| + | dpkg: error processing archive / | ||
| + | | ||
| + | dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) | ||
| + | Errors were encountered while processing: | ||
| + | / | ||
| + | Config is in use. | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | apt-get -f -o Dpkg:: | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== BADSIG ===== | ||
| Error: | Error: | ||
| Line 48: | Line 159: | ||
| + | ===== Download is performed unsandboxed ===== | ||
| + | Warning: | ||
| + | < | ||
| + | W: Download is performed unsandboxed as root as file '/ | ||
| + | </ | ||
| + | <code bash> | ||
| + | |||
| + | sudo chown -Rv _apt:root / | ||
| + | sudo chmod -Rv 774 / | ||
| + | |||
| + | </ | ||