1. When using the command apt-get install or dpkg -i in Linux, the following dependency errors sometimes appear:
At this time, you can immediately execute the following command: apt-get -f install. 2. apt-get syntax: (1) apt-get [options] command [package name] [Options] -h This help file. -q output to log - no progress indication -qq does not output information, except for errors -d Download only - does not install or unzip the archive file -s not actually installed. Simulate the execution of commands -y assumes yes to all queries, no prompt -f Attempt to fix system dependency damage -m If the archive cannot be located, try to continue -u Also displays a list of updated packages -b Compile after getting the source code package -V Displays the detailed version number -c=? Read this profile -o=? Set custom configuration options such as -o dir::cache=/tmp (2) There are also the following command fields in the syntax: update - Reget the package list upgrade - Make an update install - Install the new package remove - Remove the package autoremove - Automatically removes all unused packages purge - Remove packages and configuration files source - Download the source code file build-dep - Configure compilation dependencies for source packages dist-upgrade - Distribution upgrade dselect-upgrade - Update as selected by dselect clean - Clear the downloaded archive autoclean - Clears old downloaded archives check - Check for broken dependencies 3. Appendix--- apt-get principle As we all know, under the Linux operating system, it is very convenient to use apt-get to install software. Just one sudo apt-get install software name; The most important thing is that it can solve all kinds of complex dependencies, so that you don't have to worry about it, and before apt-get, use dpkg or earlier ./configure; make; make install to install the software is really unimaginable, after installing software A, it prompts you to install software B, and finally completes the installation, and prompts to install software C. . . All kinds of entanglements! Therefore, apt is an advanced package management tool that greatly facilitates the majority of Linux users and lowers the entry threshold for Linux users. Whenever a command is executed to install or update software, or to update a software source, apt will visit the address in /etc/apt/sources.list and find the package information of the corresponding system on the website, such as the operating system is ubuntu and the website is deb http://mirrors.163.com/ubuntu/ precise main restricted universe Multiverse NetEase, then when we execute the installation command, he will access the http://mirrors.163.com/ubuntu/dists/lucid/main/binary-i386/ packages.gz, this file is a list of packages and their dependencies on the server, and has been compressed with gzip. apt-get update uses this list to determine which supplementary packages are available and their content is saved in /var/lib/apt/lists, and by accessing this list to determine whether the software is installed, whether it is the latest version, whether the dependencies are met, and then determine whether the content is to be updated, and the installation process is mainly done by dpkg. In general, apt is a management tool that tends to be downloaded. |