LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 645|回复: 13

关于debian安装软件的一点疑惑,望高手指点

[复制链接]
发表于 2010-1-16 11:03:15 | 显示全部楼层 |阅读模式
这几天开始用debian,apt非常强大,安装软件非常方便,但是因为对系统还不是很了解,对于软件安装有一些疑惑,请高手指点。

有时要安装一个软件,比如,想安装一个dock,我经常看到debian或者ubuntu论坛上有这样的例子:

apt-get install  xxxx    yyy   zzz

这几个包都是跟这个dock程序有关的。我想知道的是,要安装这个dock,需要安装的这几个包名是从哪里找到的?也就是说有没有什么列表或者说明能告诉我们,要安装这个软件到能顺利使用,都要安装哪几个包?如果我本身第一次安装这个软件,如果只安装了第一个包,很可能就不能正常使用了。总不至于我要安装个软件都要搜一遍论坛,按照人家贴出来的实例来做吧?

不知道我说清楚没有,呵呵。

谢谢!
发表于 2010-1-16 11:44:45 | 显示全部楼层
Debian会自己解决依赖的问题,比如你想要安装一个叫wicd-1.6.2.2的包裹,而这个包裹又依赖一大堆别的东西,那么你在安装时,只要输入命令apt-get install wicd就可以了,这个包所依赖的东西如果在系统里还未安装,apt会提醒并为你安装的。

不知道我是否理解并回答了你的问题。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-16 11:55:20 | 显示全部楼层
Post by box.xoq;2064549
Debian会自己解决依赖的问题,比如你想要安装一个叫wicd-1.6.2.2的包裹,而这个包裹又依赖一大堆别的东西,那么你在安装时,只要输入命令apt-get install wicd就可以了,这个包所依赖的东西如果在系统里还未安装,apt会提醒并为你安装的。

不知道我是否理解并回答了你的问题。


谢谢回复。

你和我说的还不完全一样。我知道apt的强大就在于它会帮你解决依赖问题,会把软件依赖的包自动装上。但是,有些软件,可能有很多组件,各个组件全部集合在一起,这个软件才能算作完全安装。而这各个组件之间并不是软件依赖关系,也就是说,不会因为没有安装yyy组件就不能安装xxx组件。但是xxx和yyy都是这个软件的几个组件。

我想问的就是,怎么才能保证能把软件装全。

大家可以去看看安装compiz的例子。apt-get install 后面要写出好几个组件,来安装compiz,就是我说得这种情况。我的意思是,我怎么知道跟compiz相关的所有这些组件都有哪些?有些好像并不是包名里面就有compiz这个字符串的。
回复 支持 反对

使用道具 举报

发表于 2010-1-16 11:58:38 | 显示全部楼层
Post by linuxue;2064541
这几天开始用debian,apt非常强大,安装软件非常方便,但是因为对系统还不是很了解,对于软件安装有一些疑惑,请高手指点。

有时要安装一个软件,比如,想安装一个dock,我经常看到debian或者ubuntu论坛上有这样的例子:

apt-get install  xxxx    yyy   zzz

这几个包都是跟这个dock程序有关的。我想知道的是,要安装这个dock,需要安装的这几个包名是从哪里找到的?也就是说有没有什么列表或者说明能告诉我们,要安装这个软件到能顺利使用,都要安装哪几个包?如果我本身第一次安装这个软件,如果只安装了第一个包,很可能就不能正常使用了。总不至于我要安装个软件都要搜一遍论坛,按照人家贴出来的实例来做吧?

不知道我说清楚没有,呵呵。

谢谢!
With the use of apt, you do not actually need to understand which one depends on which other.  The dependency will be resolved automatically.

On the good side, it is automatic and you do not need to worry about anything.

On the down side, apt is too automated, you do not really understand how the system work.

If you really want to know about the dependencies of a particular package, you may visit http://packages.debian.org/ to search about it.
回复 支持 反对

使用道具 举报

发表于 2010-1-16 12:02:22 | 显示全部楼层
Post by linuxue;2064558
谢谢回复。

你和我说的还不完全一样。我知道apt的强大就在于它会帮你解决依赖问题,会把软件依赖的包自动装上。但是,有些软件,可能有很多组件,各个组件全部集合在一起,这个软件才能算作完全安装。而这各个组件之间并不是软件依赖关系,也就是说,不会因为没有安装yyy组件就不能安装xxx组件。但是xxx和yyy都是这个软件的几个组件。

我想问的就是,怎么才能保证能把软件装全。

大家可以去看看安装compiz的例子。apt-get install 后面要写出好几个组件,来安装compiz,就是我说得这种情况。我的意思是,我怎么知道跟compiz相关的所有这些组件都有哪些?有些好像并不是包名里面就有compiz这个字符串的。


In such case, the system will report to you what are the conflicting packages.  You may follow the on screen instructions to resolve the conflicts.

In the past, I always use the dpkg command to install or remove packages.  This is a very tough way but I learned a lot during those old days.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-16 12:07:49 | 显示全部楼层
Post by d00m3d;2064562
With the use of apt, you do not actually need to understand which one depends on which other.  The dependency will be resolved automatically.

On the good side, it is automatic and you do not need to worry about anything.

On the down side, apt is too automated, you do not really understand how the system work.

If you really want to know about the dependencies of a particular package, you may visit http://packages.debian.org/ to search about it.


谢谢。

但是感觉你和上一位回复我的网友都没有完全理解我的意思,我不是指软件依赖问题。
举个例子来说,比如安装compiz,网上很多安装方式,有一步是这样的:

sudo apt-get install compiz-fusion-gnome compiz-fusion-plugins-main compiz-fusion-plugins-extra fusion-icon

我就是想知道,后面空格隔开的这些组件,都是从哪里知道的。前面几个还好,都有compiz关键字,最后一个 fusion-icon,根本就没有compiz字符。

如果说debian能够完全智能安装的话,为什么不是 apt-get install compiz 就解决问题了?

不知道这次说清楚没。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-16 12:08:58 | 显示全部楼层
Post by d00m3d;2064563
In such case, the system will report to you what are the conflicting packages.  You may follow the on screen instructions to resolve the conflicts.

In the past, I always use the dpkg command to install or remove packages.  This is a very tough way but I learned a lot during those old days.


呵呵,以后深入学的话,我也会研究研究dpkg。
回复 支持 反对

使用道具 举报

发表于 2010-1-16 12:17:13 | 显示全部楼层
If you look at the dependencies of these packages, you can see compiz does not depend on fusion-icon, so installing compiz may not install fusion-icon.

However, fusion-icon depends on compiz-xxxx, installing fusion-icon will automatically install compiz-xxxx

Please pay attention, whatever package depends on which package is defined by the package maintainer, it is how the dependency work.  It is also the same as other package manager in other distros.

You system resolve the dependencies based on these pre-defined information given by the maintainer, none of the package system will not be so smart to resolve it by itself.
回复 支持 反对

使用道具 举报

发表于 2010-1-16 12:19:56 | 显示全部楼层
Post by linuxue;2064567
呵呵,以后深入学的话,我也会研究研究dpkg。


Good.  But for the time being, you may just leave it alone until you are familiar with the system.

dpkg is a very low level command and it is powerful.  It can do what apt cannot do.  If you do not use it properly, you can destroy your system.  So, it is a dangerous command for beginners.
回复 支持 反对

使用道具 举报

发表于 2010-1-16 12:25:47 | 显示全部楼层
Post by linuxue;2064565
谢谢。

但是感觉你和上一位回复我的网友都没有完全理解我的意思,我不是指软件依赖问题。
举个例子来说,比如安装compiz,网上很多安装方式,有一步是这样的:

sudo apt-get install compiz-fusion-gnome compiz-fusion-plugins-main compiz-fusion-plugins-extra fusion-icon

我就是想知道,后面空格隔开的这些组件,都是从哪里知道的。前面几个还好,都有compiz关键字,最后一个 fusion-icon,根本就没有compiz字符。

如果说debian能够完全智能安装的话,为什么不是 apt-get install compiz 就解决问题了?

不知道这次说清楚没。

按照我的理解,这些包都是用synaptic或aptitude或apt-cache搜出来的,看到包的介绍,认为自己需要,所以装了
举个例子,我装openbox,apt-get install openbox不会自动装obconf,但我用apt-cache search openbox,看到:
obconf - Preferences manager for Openbox window manager
觉得obconf是我需要的包,所以顺便apt-get install openbox obconf了

同样emacs有n多插件,大部分apt不会自动帮你装上,你搜到觉得有用的就自己把它加到apt-get install后面了

这些包一般是非主要的包,属于"增强功能"型的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表