Software Installation
Colorado State University
Computer Science Department
Original slides from Dr. James Walden at Northern Kentucky University.
$PATH
, etc.)
Any package manager must have:
dpkg
and apt
(advanced package tool)
pkg-add
packaging system
portage
with emerge
command
installpkg
manages .tgz
files
rpm
(redhat package manager) packaging system.
up2date
: RHEL interface to RPM
urpmi
: Mandriva interface to RPM
yast
: SuSE interface to RPM
yum
: Fedora interface to RPM
A package, in general, is a encapsulation of a program or programs. It contains:
Some packages contain many programs. The Debian coreutils
package
contains 232 files, including these programs:
Debian (and hence Ubuntu (and hence Xubuntu)) uses *.deb
files
to hold packages.
On Ubuntu, the most primitive package manager is Debian’s dpkg
.
I rarely use it directly.
There are many programs that provide a better interface than dpkg
:
apt
: command-line wrapper around dpkg
apt-get
: roughly the same
aptitude
: roughly the same
synaptic
: graphical interface to install & remove packages
software-center
:
a very friendly interface to look for new packages,
like the Google Play Store
update-manager
:
graphical interface that looks for updates, like Windows Update.
Often run from cron
.
% sudo apt-get install zoo Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: zoo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 74.5 kB of archives. After this operation, 169 kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu/ vivid/universe zoo amd64 2.10-27 [74.5 kB] Fetched 74.5 kB in 0s (225 kB/s) Selecting previously unselected package zoo. (Reading database ... 225219 files and directories currently installed.) Preparing to unpack .../archives/zoo_2.10-27_amd64.deb ... Unpacking zoo (2.10-27) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up zoo (2.10-27) ...
Remove a package, leave configuration files behind.
% sudo apt-get remove zoo Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: zoo 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 169 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 225225 files and directories currently installed.) Removing zoo (2.10-27) ... Processing triggers for man-db (2.7.0.2-5) ...
Completely removes package from system, including configuration files.
% sudo apt-get purge zoo Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: zoo* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 169 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 225225 files and directories currently installed.) Removing zoo (2.10-27) ... Processing triggers for man-db (2.7.0.2-5) ...
For example, a number of packages depend upon the cups
package.
Removing cups
will remove several other packages:
% sudo apt-get remove cups Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: bluez-cups cups hplip printer-driver-gutenprint printer-driver-hpcups printer-driver-postscript-hp printer-driver-splix 0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded. After this operation, 5,688 kB disk space will be freed. Do you want to continue? [Y/n] n Abort.
Verify that all installed files match the md5sum.
% sudo dpkg --verify ??5?????? c /etc/sudoers ??5?????? c /etc/default/rcS ??5?????? /usr/bin/xdg-open
dpkg --get-selections
dpkg --get-selections 'vim*'
dpkg-query -Wf '${Installed-Size} ${Package}\n' | sort -n
dpkg -S /bin/date
dpkg -L coreutils
apt-cache show gcc
Do this every week or so:
% sudo apt-get update % sudo apt-get dist-upgrade % sudo apt-get autoremove
apt-get upgrade
Updates all packages currently on the system. Won’t remove old packages, or install new packages.
apt-get dist-upgrade
Like upgrade
, but also intelligently handles changing dependencies
with new versions of packages; has a “smart” conflict resolution
system, and it will attempt to upgrade the most important packages at
the expense of less important ones if necessary. It may therefore
remove some packages.
Modified: 2017-09-14T12:58 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |