Lesson 6: Packages, Software, Libraries

Homepage Content Slides Video

Warning

This lesson is under construction. Learn from it at your own risk. If you have any feedback, please fill out our General Feedback Survey.

Overview

Software

Everything that isn't hardware.

Libraries

Package Management

Core Package Management Functionality

TLDR: To take care of installation, removal, and updates of software.

Programming Langauge Package Managers

Examples:

Other Package Managers

Portage
The Source-based package manager for Gentoo.
Yaourt
An Arch User Repository wrapper for Pacman, the Arch Linux Package manager.
Nix
A 'Fully Functional/Transactional' package manager.
Brew
An Open Soruce package manager for OSX.
Chocolatey
A package manager for Windows.

Installation from Soruce

How to install a package from source:

  1. Download source code .zip (Zip) or .tar.xz/bz2/xz (Tarball).
  2. Unpack the downloaded code.
  3. Run the setup and configuration scripts.
  4. Build the program.
  5. Resolve any unmet dependencies and repeat previous two steps if it fails.
  6. Place the binaries in a consistent location.

Installation from Soruce

Using grep as an example:

$ wget http://mirrors.kernel.org/gnu/grep/grep-2.25.tar.xz
$ tar -Jxvf grep-2.25.tar.xz
$ cd grep-2.25
$ ./configure --prefix=$HOME/bin/
$ make
$ make install

TODO: Install sl

$ sudo apt install git gcc make ncurses-bin ncurses-base libncurses5-dev libncurses5-dev
[...]

TODO: Install sl

$ git clone https://github.com/mtoyoda/sl.git
[...]
$ cd sl
$ make
gcc -O -o sl sl.c -lncurses
$ mkdir ~/bin
$ ln sl ~/bin/
$ echo "export PATH=$PATH:$HOME/bin" >> ~/.bashrc
$ source ~/.bashrc
$ whereis sl
sl: /home/username/bin/sl
$ sl

Further Reading