Advanced 2: Packages
Harrison Kuo
decal.ocf.berkeley.edu/signin | Magic word: Shannon
Overview
What is a package?
Package Management
DPKG vs APT
APT commands
apt update
Grabs a new list (catalogue) of what packages are available.
apt install packagename
Installs the package.
apt remove
Uninstalls the package.
APT commands (Con’t)
apt upgrade
Updates the packages.
apt-cache search packagesearchterm
Searches for the package in the catalogue
apt-cache depends packagename
Lists the dependencies for the package
DPKG commands
dpkg -i packagefilename
Installs the local .deb file.
dpkg --remove packagename
Removes the package.
dpkg -I packagefilename
Inspects the package.
DPKG commands (Con’t)
dpkg --configure -a
Configures all packages which have been unpacked but have not completed installing. Run this if your install is interrupted and your installation becomes corrupted.
Example: Installing a package
What just happened
What just happened (Con’t)
2. apt install then:
Troubleshooting Packages
Usually you will encounter problems with packages in three ways:
Example: Installing a package with missing dependencies
What just happened?
The Structure of a Package
/usr
/usr/share
Documentation/Etc
/usr/bin
Executables/Binaries
/usr/lib
Libraries
/usr/include
Header Files
.deb
Metadata
version#, name, etc
Example: Creating a package
What just happened?
What just happened? (Con’t)
3. The folder was packaged, using fpm, into a .deb file
Thanks!
The assignment will be up after you get your VMs!
Remember to sign in at:
decal.ocf.berkeley.edu/signin | Magic word: Shannon