LinuxSir.cn,穿越时空的Linuxsir!

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

关于tar.gz文件的安装

[复制链接]
发表于 2006-8-9 20:31:59 | 显示全部楼层 |阅读模式
我在安装一个****.tar.gz  的时候    看到这么一句
"通常的安装方法是从安装包的目录执行以下命令"
请问该怎么理解这句?
我在解压之后的目录中找到一个configure文件  
打开终端  把configure拖拉到终端  回车  然后出现几行字
再直接键入make   回车    然后显示找不到文件什么的
发表于 2006-8-9 20:46:19 | 显示全部楼层
tar -xzf *.tar.gz
cd <path>
./configure
make
make install(root用户)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-9 21:31:21 | 显示全部楼层
Post by KevinChen
tar -xzf *.tar.gz
cd <path>
./configure
make
make install(root用户)


关于以上的命令我在其他地方也看得到,在install文件里也看得到.我的问题是:
"通常的安装方法是从安装包的目录执行以下命令"
请问该怎么理解这句?
而不是用什么命令.
重点在于"从安装包的目录",
不怕笑话,我还没有成功安装过一个软件呢.所以我很迷惑,无论我怎么操作好像都是错的,这让我快发疯了.
回复 支持 反对

使用道具 举报

发表于 2006-8-9 22:41:38 | 显示全部楼层
Post by kaloni
关于以上的命令我在其他地方也看得到,在install文件里也看得到.我的问题是:
"通常的安装方法是从安装包的目录执行以下命令"
请问该怎么理解这句?
而不是用什么命令.
重点在于"从安装包的目录",
不怕笑话,我还没有成功安装过一个软件呢.所以我很迷惑,无论我怎么操作好像都是错的,这让我快发疯了.

[color="Magenta"]
确切的说,如果你想安装一个TARBALL格式的软件。如foobar-1.0.tar.gz,先解压这个软件到你指定的目录下,通常为/usr/local/,然后进入到其中:

  1. $cd /usr/local/foobar-1.0
  2. #read the README FILE first
  3. $./configure                     
  4. $make
  5. $make install
复制代码

我这样解释够清楚了吧!!!!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-10 00:03:59 | 显示全部楼层
我开始开窍了,呵呵,我一心急起来什么都忘了,原来“从安装包的目录”是用CD命令进去,dos下我就会这样用,linux下我就忘关了,这个说明我真是连linux的一小小部分都没有了解到,我失败。
谢谢这位兄弟耐心说明,谢谢!!
回复 支持 反对

使用道具 举报

发表于 2006-8-10 02:51:59 | 显示全部楼层
Post by mylynx
[color="Magenta"]
确切的说,如果你想安装一个TARBALL格式的软件。如foobar-1.0.tar.gz,先解压这个软件到你指定的目录下,通常为/usr/local/,然后进入到其中:

  1. $cd /usr/local/foobar-1.0
  2. #read the README FILE first
  3. $./configure                     
  4. $make
  5. $make install
复制代码

我这样解释够清楚了吧!!!!
In general, it is suggested to use root only to carry out administrative tasks such as installing (not compiling) software as described by KevinChen in 2nd floor.

As a rule of thumb, source trees should be extracted to somewhere else and compiled by a normal user.  Once compilation is finished, install the software by root.

It is not a good idea to extract your source tree into /usr/local for 2 reasons:

1. /usr/local is usually owned by root, this means you need root privilege to write /usr/local and compile the source codes as root

2. /usr/local may be used as the location for compiled binaries rather than a location for source trees, otherwise, it will be messed up with source trees and binaries.

Further information about the desire installing directory, please read "[color="Blue"]The /usr Versus /usr/local Debate"

On the other hand, it is possible to specify the target installation path of the binaries during configure, e.g.

$tar xf *.tar.gz
$cd <path>
$./configure [color="Blue"]--prefix=/usr
$make
$su
[color="Red"]#make install (root用户)

For detail installation instructions, you should read the relevant documentation such as README and INSTALL etc, supplied with your software.
回复 支持 反对

使用道具 举报

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

本版积分规则

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