Debian如何安装闭源软件包

  我们有时候会因为工作的需要会在Debian下安装特定的闭源设备驱动,那么你知道Debian如何安装闭源软件包吗?如果你还不了解的话就一起跟中国E盟小编一起去了解。

  Debian是一个拥有48,000软件包的发行版。 这些软件包被分为三类: main, contrib 和 non-free, 主要是根据许可证要求, 参照Debian开源软件指南 (DFSG)。

  main软件仓库包括符合DFSG的开源软件。contrib也包括符合DFSG的开源软件,但是依赖闭源软件来编译或者执行。non-free包括不符合DFSG的、可再分发的闭源软件。main仓库被认为是Debian项目的一部分,但是contrib和non-free不是。后两者只是为了用户的方便而维护和提供。

  如果你想一直能够在Debian上安装闭源软件包,你需要添加contrib和non-free软件仓库。这样做,用文本编辑器打开 /etc/apt/sources.list 添加“contrib non-free”“到每个源。

  下面是适用于 Debian Wheezy的 /etc/apt/sources.list 例子。

  deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free

  deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free

  deb http://security.debian.org/ wheezy/updates main contrib non-free

  deb-src http://security.debian.org/ wheezy/updates main contrib non-free

  # wheezy-updates, 之前叫做 ‘volatile’

  deb http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free

  deb-src http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free

 Debian安装闭源软件包的方法

  修改完源后, 运行下面命令去下载contrib和non-free软件仓库的文件索引。

  $ sudo apt-get update

  如果你用 aptitude, 运行下面命令。

  $ sudo aptitude update

  现在你在Debian上搜索和安装任何闭源软件包。

 Debian安装闭源软件包的方法

  上面就是Debian如何安装闭源软件包的方法,在安装之前,我们要先修改源再下载contrib和non-free软件仓库的文件索引,就可以安装闭源软件包了。