102.4 Use Debian package management

Description

102.4 Use Debian package management
Rolando Martinez
Mind Map by Rolando Martinez, updated more than 1 year ago
Rolando Martinez
Created by Rolando Martinez over 3 years ago
6
0

Resource summary

102.4 Use Debian package management
  1. Introduction
    1. A long time ago, when Linux was still in its infancy
      1. (usually a .tar.gz archive
        1. Compilated
      2. as the amount and complexity of software grew, the need for a way to distribute pre-compiled software
        1. Debian package format (.deb
          1. dpkg
            1. -i:instalar (*.deb) -r:emover, -I:Informacin( *deb) -L:lista -S:Pacquete Dueño - de un archivo -c_lista el cntenido (*.deb)
              1. -i(deb), -l(paq), -I(deb), -s(paq), -S(file), -L(paq), -r(paq)
              2. dpkg-query -S archivo
              3. apt
          2. The Debian Package Tool (dpkg)
            1. configure, maintain and remove software packages on Debian-based systems
              1. dpkg -i packagename.deb
            2. Dealing with Dependencies
              1. a package may depend on others to work
                1. an image editor may need libraries to open JPEG files,
                2. to install the OpenShot video editor package,
                  1. dpkg -i openshot-qt_2.4.3+dfsg1-1_all.deb
                    1. openshot-qt depends on fonts-cantarell; however: Package fonts-cantarell is not installed. openshot-qt depends on python3-openshot; however: Package python3-openshot is not installed.
                      1. OpenShot depends on the fonts-cantarell, python3-openshot, python3-pyqt5, python3-pyqt5.qtsvg, python3-pyqt5.qtwebkit and python3-zmq packages. All of those need to be installed before the installation of OpenShot can succeed.
                        1. dpkg -i --force packaname.deb
                      2. Removing Packages
                        1. dpkg -r unrar
                          1. The removal operation also runs a dependency check, and a package cannot be removed unless every other package that depends on it is also removed
                      3. Getting Package Information
                        1. # dpkg -I google-chrome-stable_current_amd64.deb
                          1. Package: google-chrome-stable Version: 76.0.3809.100-1 Architecture: amd64 Maintainer: Chrome Linux Team <chromium-dev@chromium.org> Installed-Size: 205436 Pre-Depends: dpkg (>= 1.14.0)
                        2. Listing Installed Packages and Package Contents
                          1. # dpkg -L unrar
                            1. /. /usr /usr/bin /usr/bin/unrar-nonfree /usr/share
                          2. Finding Out Which Package Owns a Specific File
                            1. # dpkg-query -S /usr/bin/unrar-nonfree unrar: /usr/bin/unrar-nonfree
                              1. dpkg --get-selections
                                1. Lists out (enumera) every package that dpkg has installed on the system.
                            2. Reconfiguring Installed Packages
                              1. post-install
                                1. permisos
                                  1. file configuration
                                    1. ask some questions of the user to set preferences
                                    2. dpkg-reconfigure packagename,
                                      1. will back-up the old configuration files,
                                        1. unpack the new ones in the correct directories
                                          1. and run the post-install script provided by the package
                                            1. dpkg-reconfigure tzdata
                                              1. example
                                          2. Advanced Package Tool (apt)
                                            1. is a package management system
                                              1. including a set of tools
                                                1. that greatly simplifies package installation, upgrade, removal and management
                                                  1. automatic dependency resolution.
                                                    1. APT works in concert with software repositories which contain the packages available to install.
                                                      1. apt-get used to download, install, upgrade or remove packages from the system.
                                                        1. apt-cache used to perform operations, like searches, in the package index.
                                                          1. apt-file used for searching for files inside packages
                                                          2. Updating the Package Index
                                                            1. apt-get update
                                                            2. Installing and Removing Packages
                                                              1. # apt-get install xournal
                                                                1. # apt-get remove xournal
                                                                  1. apt-get purge p7zip
                                                                    1. apt-get remove --purge p7zip
                                                                    2. Fixing Broken Dependencies
                                                                      1. apt-get install -f
                                                                      2. Upgrading Packages
                                                                        1. apt-get update apt-get upgrade
                                                                        2. The Local Cache
                                                                          1. /var/cache/apt/archives
                                                                            1. file is downloaded to a local cache directory
                                                                            2. /var/cache/apt/archives/partial/
                                                                              1. Partially downloaded
                                                                            3. The Sources List
                                                                              1. /etc/apt/sources.list
                                                                                1. deb http://us.archive.ubuntu.com/ubuntu/ disco main restricted universe multiverse
                                                                                  1. Archive type
                                                                                    1. deb:binario deb-source:fuente
                                                                                    2. url repository
                                                                                      1. main:soportado oficialmente
                                                                                        1. restricted: soportado oficialmente y codigo cerrado
                                                                                          1. universe:Software open source comunidad
                                                                                            1. multiverse:contains unsupported, closed-source or patent-encumbered software.
                                                                                              1. distribucion:dsco
                                                                                                1. disco:disco dingo
                                                                                                  1. main:packages compilados con Debian Free Software Guidelines
                                                                                                    1. contrib:contains DFSG-compliant packages, depends of other packages not main
                                                                                                      1. non-free
                                                                                                        1. not compliant with the DFSG.
                                                                                                        2. security
                                                                                                          1. contains security updates.
                                                                                                          2. backports
                                                                                                            1. contains more recent versions of packages that are in main
                                                                                                    2. Searching for Packages
                                                                                                      1. apt-cache search p7zip
                                                                                                        1. apt-cache show liblzma5
                                                                                                        2. /etc/apt/sources.list.d Directory
                                                                                                          1. add files with additional repositories to be used by APT, without the need to modify the main /etc/apt/sources.list file.
                                                                                                            1. These are simple text files, with the same syntax described above and the .list file extension.
                                                                                                          2. Listing Package Contents and Finding Files
                                                                                                            1. # apt-get install apt-file
                                                                                                              1. apt-file update
                                                                                                                1. apt-file update
                                                                                                                  1. apt-file search libSDL2.so
                                                                                                                  2. Preguntas Y Repuestas
                                                                                                                    1. What is the command to install a package named package.deb using dpkg
                                                                                                                      1. dpkg -i package-name
                                                                                                                      2. Using dpkg-query, find which package contains a file named 7zr.1.gz.
                                                                                                                        1. dpkg-query -S 7zr.1.gz
                                                                                                                        2. Can you remove a package called unzip from the system using dpkg -r unzip if the package file-roller depends on it? If not, what would be the correct way to do it?
                                                                                                                          1. No. dpkg will not resolve dependencie
                                                                                                                          2. How can you find out which package contains the file /usr/bin/unrar using the apt-file utility?
                                                                                                                            1. # apt-file search /usr/bin/unrar
                                                                                                                            2. Using apt-cache, what is the command to show information for the package gimp?
                                                                                                                              1. # apt-cache show gimp
                                                                                                                              2. Consider a repository with Debian source packages for the xenial distribution, hosted at http://us.archive.ubuntu.com/ubuntu/ and with packages for the universe component. What would be the corresponding line to be added to /etc/apt/sources.list? Source packages are of the deb-src type, so the line should be:
                                                                                                                                1. deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
                                                                                                                                2. While compiling a program, you come across an error message complaining that the header file zzip-io.h is not present on your system. How can you find out with package provides that file? Use apt-file search to find which package contains a file not present in the system:
                                                                                                                                  1. # apt-file search zzip-io.h
                                                                                                                                  2. How can you ignore a dependency warning and remove a package using dpkg, even if there are packages that depend on it in the system?
                                                                                                                                    1. The parameter --force can be used,
                                                                                                                                    2. How can you get more information about a package called midori using apt-cache?
                                                                                                                                      1. # apt-cache show midori
                                                                                                                                      2. Before installing or updating packages with apt-get, which command should be used to ensure that the package index is up-to-date?
                                                                                                                                        1. apt-get update
                                                                                                                                      Show full summary Hide full summary

                                                                                                                                      Similar

                                                                                                                                      KING LEAR
                                                                                                                                      Felicity Baines
                                                                                                                                      Chemistry General Quiz - 2
                                                                                                                                      lauren_johncock
                                                                                                                                      AQA Core Biology (B1) - 1.1 - Keeping Healthy
                                                                                                                                      NiallRamphal
                                                                                                                                      GCSE Maths Symbols, Equations & Formulae
                                                                                                                                      Andrea Leyden
                                                                                                                                      Key Events, People and Terms of the French Revolution
                                                                                                                                      poppwalton
                                                                                                                                      AQA GCSE Physics Unit 3 Mindmap
                                                                                                                                      Gabi Germain
                                                                                                                                      PSBD TEST # 3
                                                                                                                                      Suleman Shah
                                                                                                                                      Hamlet (William Shakespeare) - Key Characters
                                                                                                                                      daniel.praecox
                                                                                                                                      Atomic Structure
                                                                                                                                      dpr898
                                                                                                                                      Music Therapy Practice Exam (with explanations)
                                                                                                                                      Hannah Rebecca