LinuxSir.cn,穿越时空的Linuxsir!

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

请教pacman 如何可以指定pkg的版本,和安装某个软件的编译依赖

[复制链接]
发表于 2008-11-10 22:46:53 | 显示全部楼层 |阅读模式
简单的的说就是实现Debian的:
apt-get built-dep <pkgname>
------------------------------------------
以及 apt-get install <pkg-name>=version
------------------------------------------
原因是我编译一段源码需要依赖autoconf2.13,可是居然没找到.难道要自己check out源码来编译.

最后貌似pacman 缺少apt-file search的功能.
官方forum上面的脚本也只能检索本地的文件.有的时候恰恰需要比如一个*.h文件在哪一个包里的场景.而这个包目前没有安装.
发表于 2008-11-10 23:37:14 | 显示全部楼层
Post by kofshower;1906917
简单的的说就是实现Debian的:
apt-get built-dep <pkgname>
------------------------------------------
以及 apt-get install <pkg-name>=version
------------------------------------------
原因是我编译一段源码需要依赖autoconf2.13,可是居然没找到.难道要自己check out源码来编译.

最后貌似pacman 缺少apt-file search的功能.
官方forum上面的脚本也只能检索本地的文件.有的时候恰恰需要比如一个*.h文件在哪一个包里的场景.而这个包目前没有安装.
makepkg -s

man makepkg
s, --syncdeps
           Install missing dependencies using pacman. When build-time or
           run-time dependencies are not found, pacman will try to resolve
           them. If successful, the missing packages will be downloaded and
           installed.
不知道满足楼主要求吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-11 09:29:53 | 显示全部楼层
Post by imagelife;1906936
makepkg -s

man makepkg
s, --syncdeps
           Install missing dependencies using pacman. When build-time or
           run-time dependencies are not found, pacman will try to resolve
           them. If successful, the missing packages will be downloaded and
           installed.
不知道满足楼主要求吗?

多谢回答.其实我就是自己些PKGBUILD的时候的问题,
比如一个源码包本身依赖:
# A recent POSIX Shell
# A C++ compiler. GCC 3.4 or higher is recommended, or your platform's native C/C++ compiler.
# Perl 5.6 or higher. Older perl versions may work if you upgrade File::Spec to version 0.8
# GNU make 3.79.1 or higher. Other varieties of "make" will not work.
# CVS 1.11 or higher
# the GTK2 widget toolkit, version 2.10 or higher
# libXt-devel for X11/Intrinsic.h, X11/Shell.h
# libIDL 0.6.3 or higher Source snapshots are available from Mozilla via ftp. If using the RPMs, you'll need both the regular rpm and the -devel rpm. If you already have ORBit installed, then you do not need to install libIDL as ORBit bundles libIDL. You may need to install the ORBit-devel package if you use packages.
# zip 2.3 (or higher)
# freetype 2.1.0 (or higher)
# fontconfig
# pkg-config 0.9.0 (or higher)
# dbus-1-glib-devel (Developer package for D-Bus/GLib bindings)
# libasound2-dev (needed for Ogg support)
#

autoconf-2.13 (requires GNU m4) - Autoconf 2.5x will not work. See bug 104642 for details.
On Fedora/RedHat: sudo yum install autoconf213
On Ubuntu/Debian: sudo apt-get install autoconf2.13
可是处理依赖关系的时候常常看到源里没有的包,所以你不能通过pacman找到它.那么你本身的话必须安装一个2.13版的autoconfig. 所以有这个疑问,archlinux没有对应低版本的包么. 貌似在wiki上面的downgrade package中提到过4个存放低版本包的soft pool,可是也没符合的. 此外需要多个版本的软件的场合的话archlinux是由我们自己通过ln -s 来管理,还是有个版本选择的(类似upgrade-alternate)这样的工具来选择符号链接的的版本.
其实这个倒是蛮好用的.特别是最近升级了python2.6之后,好些rox 的app不能用了.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-11 09:44:36 | 显示全部楼层
apt-file 的那个功能解决了,因为官方的镜像下面有个存放文件列表的包.Now every mirror has a $repo.files.tar.gz next to its $repo.db.tar.gz, for each $repo.
回复 支持 反对

使用道具 举报

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

本版积分规则

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