apt-get install 是 ubuntu 下的软件安装命令。

  • sudo apt-get -y install:

    • -y:yes,在命令行交互提示中,直接输入 yes;

1. 使用 add-apt-repository 为 apt-get 添加 PPA

比如为安装 emacs 需添加某 PPA(Personal Package Archives : Ubuntu):

sudo add-apt-repository ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs-snapshot emacs-snapshot-el
  • 添加docker源:

    $ sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable"
    $ sudo apt-get update

2. –no-install-recommends

  • –no-install-recommends参数来避免安装非必须的文件,从而减小镜像的体积:

3. -f:解决包依赖的问题

  • sudo apt-get -f install

4. apt-get upgrade 与 apt-get dist-upgrade

apt-get upgarde 和dist-upgrade的差别

二者的区别同样在于对包的依赖关系的处理上:

  • upgrade:系统将现有的 Package 升级,如果有相依性的问题,而此相依性需要安装其它新的Package或影响到其它Package的相依性时,此Package就不会被升级,会保留下来;

    • 一种相对稳妥保险的做法;不替用户做更多的操作;
  • dist-upgrade:
    • 如果遇到依赖性问题,需要安装新的Package(或移除旧的 package),就会试着去安装/移除它.

apt-get install 的参数(add-apt-repository)的更多相关文章

  1. 参考 https://raspberrypi.stackexchange.com/questions/3617/how-to-install-unrar-nonfree > 1.卸载unrar-free。 $ sudo apt-get remove unrar-free \ 2.通过编辑确保您拥有源存储库/etc/apt/sources.list。 $ cat /etc/apt/sources.

    from my CSDN: https://blog.csdn.net/su_cicada/article/details/86939944 参考 https://raspberrypi.stacke ...

  2. How-To: add EPEL repository to Centos 6.x is Easy!

    How-To: add EPEL repository to Centos 6.x is Easy! | ITek Blog How-To: add EPEL repository to Centos ...

  3. pom.xml配置,针对mvn clean install -P参数(环境参数)打包

    pom.xml配置,针对mvn clean install -P参数(环境参数)打包 比如你有2个环境,一个dev,一个prod, 然后你在mvn打包的时候,可以通过-P来打包,是打dev包,还是pr ...

  4. 解决ubuntu使用命令sudo apt -get install 安装东西时出现"E: Sub-process /usr/bin/dpkg returned an error code (1) "的错误

    问题描述: 今天在使用命令 "sudo apt-get install python3-pip"安装时,总是出现如下图这样的错误,开始以为是以为自己python版本的问题,后来发现 ...

  5. ubuntu apt 主要命令及参数

    1. apt-cache search package 搜索安装包 2. apt-cache search all 搜索所有安装包 3. apt-cache show package 显示安装包信息 ...

  6. apt --fix-broken install

    1 自动修复安装出现broken的package 但是,如果还是失败的话,就需要手动进行干预了.

  7. [debian]use ISO as debian apt source / 使用ISO文件作为apt源

    准备文件: debian-9.8.0-amd64-DVD-1.iso debian-9.8.0-amd64-DVD-2.iso debian-9.8.0-amd64-DVD-3.iso 挂载: roo ...

  8. 在centos中搭建基于nginx的apt源服务器,整合yum源和apt源在一台服务器

    1.首先关闭防护墙或者设置规则通过且关闭selinux 2.nginx-1.14.2版本(编译安装)-自定义安装路径 3.开启nginx目录浏览 以上步骤请参考前文:https://www.cnblo ...

  9. Easy Install详细参数

    Easy Install Easy Install is a python module (easy_install) bundled with setuptools that lets you au ...

  10. npm install warning: no description; no repository field

    npm install 报错:warning no description; no repository field 开始以为必须npm init,npm init在git bash(win7)里,还 ...

随机推荐

  1. 算法 Tricks(三)—— 数组(序列)任意区间最小(大)值

    序列(数组)的区间通过左右端点确定,这样首先设置一个最值变量用来记录最值,从左端点一步步移动到右端点,自然移动的过程中也可以计算整个区间的和,也即一次线性遍历下来,可同时获得多个有用信息. // 区间 ...

  2. 使用Samba在Linux服务器上搭建共享文件服务

    最近我们的小团队需要在服务器上共分出一个共享文件夹用于大家存放公共的资源文档, 大家想啊,这肯定很简单呀,在Windows下面只要创建相关的windows account,共享某个文件夹,把读/写权限 ...

  3. WCF 设计和实现服务协定(01)

    作者:jiankunking 出处:http://blog.csdn.net/jiankunking WCF 术语: • 消息 – 消息是一个独立的数据单元,它可能由几个部分组成,包含消息正文和消息头 ...

  4. 前端项目课程3 jquery1.8.3到1.11.1有了哪些新改变

    web项目课程3  jquery1.8.3到1.11.1有了哪些新改变 一.总结 一句话总结:领会官方升级的意思.  1.live();    2.die();    3.bind();    4.u ...

  5. Java 线程第三版 第九章 Thread调度 读书笔记

    一.Thread调度的概述 import java.util.*; import java.text.*; public class Task implements Runnable { long n ...

  6. [Angular2 Form] Create custom form component using Control Value Accessor

    //switch-control component import { Component } from '@angular/core'; import { ControlValueAccessor, ...

  7. 【7.89%】【BNUOJ 52303】Floyd-Warshall

    Time limit: 2 seconds Memory limit: 1024 megabytes In ICPCCamp, there are n cities and m (bidirectio ...

  8. xmpp即时通讯协议的特性---长处和缺点!

    xmpp协议的定义? XMPP是一种基于标准通用标记语言的子集XML的协议,它继承了在XML环境中灵活的发展性. 因此.基于XMPP的应用具有超强的可扩展性.经过扩展以后的XMPP能够通过发送扩展的信 ...

  9. ebook https://salttiger.com/category/notification/

    https://salttiger.com/category/notification/ 因为个人精力有限,持续搜集.整理.分享电子书已经占用我大部分业余时间,今后不再给评论区留言的朋友们找书,还希望 ...

  10. 【47.95%】【codeforces 554C】Kyoya and Colored Balls

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...