dpkg的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

dpkg的问题

#1

帖子 goter » 2008-03-08 7:55

各位兄弟,dpkg有没有参数,可以用来选择软件的安装目录??
我百度半天都没找到
dbzhang800
帖子: 3182
注册时间: 2006-03-10 15:10
来自: xi'an China
联系:

#2

帖子 dbzhang800 » 2008-03-08 9:02

dpkg 当然有参数

man dpkg 自己看看

选择安装目录? 这个不是dpkg的工作吧,
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

#3

帖子 goter » 2008-03-08 9:08

那要选择安装目录的话,就只能用源代码安装了?
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

#4

帖子 goter » 2008-03-09 9:58

顶上去!
littleUbuntu
帖子: 1103
注册时间: 2006-10-19 9:02

#5

帖子 littleUbuntu » 2008-03-09 10:36

想自己选择安装目录,就只能自己make

在make的时候加入--prefix=/path/to/install

dpkg安装deb包那已经是make好的了,应该不能修改安装目录。
头像
iblicf
帖子: 3766
注册时间: 2007-01-15 17:15

#6

帖子 iblicf » 2008-03-09 10:36

代码: 全选

--instdir=dir
              Change default installation directory which refers to the
              directory  where packages are to be installed. instdir is
              also the directory passed  to  chroot(2)  before  running
              package's  installation  scripts,  which  means  that the
              scripts see instdir as a root directory.
littleUbuntu
帖子: 1103
注册时间: 2006-10-19 9:02

#7

帖子 littleUbuntu » 2008-03-09 10:38

iblicf 写了:

代码: 全选

--instdir=dir
              Change default installation directory which refers to the
              directory  where packages are to be installed. instdir is
              also the directory passed  to  chroot(2)  before  running
              package's  installation  scripts,  which  means  that the
              scripts see instdir as a root directory.
强,竟然以前不知道。呵呵,man....
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

#8

帖子 goter » 2008-03-09 20:09

服了!谢谢littleUbuntu,谢谢iblicf,谢谢dbzhang800
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

#9

帖子 goter » 2008-03-10 13:31

还有一个问题
如果安装到其他目录,那直接在命令行输入命令就会提升没有安装此软件
除非进入安装目录,用命令打开

我想直接输入命令就可以打开,而不是每次都进入安装目录用命令行打开
是不是还得拷贝什么到/usr目录啊????????????
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

#10

帖子 goter » 2008-03-10 18:05

设置环境变量???
littleUbuntu
帖子: 1103
注册时间: 2006-10-19 9:02

#11

帖子 littleUbuntu » 2008-03-10 18:10

goter 写了:设置环境变量???
设置环境变量,或者做一个ln -s 链接到/usr/local/bin or /usr/bin中,后者比较好,安全
头像
goter
帖子: 59
注册时间: 2007-10-14 4:08

#12

帖子 goter » 2008-03-10 18:39

哦,i get it.
谢谢大家了 :oops: :oops:
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#13

帖子 eexpress » 2008-03-10 20:01

有点折腾哦。强制目录,再ln。@@
● 鸣学
回复