LinuxSir.cn,穿越时空的Linuxsir!

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

请问有没有什么办法编译安装软件,可以在重装系统后还可以用?

[复制链接]
发表于 2005-5-23 10:22:16 | 显示全部楼层 |阅读模式
这样可以避免重复编译安装了,谢谢!
发表于 2005-5-23 10:34:10 | 显示全部楼层
据说可以给/usr/local单独分一个区,把所有自己编译的软件都装到那里。下次重装的时候不格式化这个分区,直接挂载到/usr/local下就可以了。
这个方法我没试过。
这样的话其他装到/usr/share等目录下的文件就没有了,所以虽然程序仍然可用但不完整。

我推荐的方法是,make完之后就把整个目录打包,以后只要make install即可,不用重新编译了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-23 10:44:37 | 显示全部楼层
如果我在红旗中make 好了,可以拿到redhat 中来make install  吗?

或者在FC2中make 好了可以在FC3中make install吗
回复 支持 反对

使用道具 举报

发表于 2005-5-23 10:54:43 | 显示全部楼层
请问有没有什么办法编译安装软件,可以在重装系统后还可以用?
It depends on how do you 重装系统.
据说可以给/usr/local单独分一个区,把所有自己编译的软件都装到那里。下次重装的时候不格式化这个分区,直接挂载到/usr/local下就可以了。
这个方法我没试过。
这样的话其他装到/usr/share等目录下的文件就没有了,所以虽然程序仍然可用但不完整。

我推荐的方法是,make完之后就把整个目录打包,以后只要make install即可,不用重新编译了。
First of all, please understand how did your package being compiled.

Before you run "make" and "make install", usually you need to run "configure" (with some options).  The configure script will determine package dependencies and then when you run "make", your package binaries are usually dynamic link to your current system libraries.

Therefore, if you re-install your system, this method is only applicable when:

1. The re-installed system is identical to the previous installation. In other words, if you are upgrading system, say from RH8 to RH9, this method may not work.

2. You compile your package with static links.
回复 支持 反对

使用道具 举报

发表于 2005-5-23 10:56:57 | 显示全部楼层
Post by Georock
如果我在红旗中make 好了,可以拿到redhat 中来make install  吗?

或者在FC2中make 好了可以在FC3中make install吗

It may or may not work.  It depends on how your package binaries are linked to your system libraries.

I do not use FC, if the libraries in FC2 are similar version to FC3, then it may work.
回复 支持 反对

使用道具 举报

发表于 2005-5-23 12:13:32 | 显示全部楼层
please understand how did your package being compiled.
语法错了吧?应该是
please understand how your package was being compiled.
回复 支持 反对

使用道具 举报

发表于 2005-5-23 14:50:07 | 显示全部楼层
Oh, dear! Typos! :p
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-23 18:23:07 | 显示全部楼层
thank  u ,but  how can   i  compile the  package with static links?
回复 支持 反对

使用道具 举报

发表于 2005-5-23 18:34:33 | 显示全部楼层
edit your Makefile and add CFLAGS --static
回复 支持 反对

使用道具 举报

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

本版积分规则

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