View Full Version : how to check package dependencies?
bsdnewbie999
07-30-2008, 03:23 AM
I met some problems when i try to install a package, for example eclipse. While eclipse require other packages but how to i know the required packages before i install it?So i can download all the requirements and install it one time.
ocicat
07-30-2008, 03:30 AM
...but how to i know the required packages before i install it?
Before you are finished, you may need both of the following:
make print-build-depends
make print-run-depends
More useful targets can be found in the ports manpage.
bsdnewbie999
07-30-2008, 01:53 PM
i see. :)
jggimi
07-30-2008, 02:28 PM
As ocicat mentioned, the ports tree can be helpful for research and planning, if you have the disk space.
If you just want to install a package, and you have an Internet connection, you do not need to know the dependency structure. All you need to do is set the PKG_PATH environment variable and run pkg_add. All dependencies will be automatically installed.
ocicat
07-30-2008, 03:42 PM
As ocicat mentioned, the ports tree can be helpful for research and planning, if you have the disk space.
Unless it has been deleted, bsdnewbie999 had the ports tree installed given a number of questions he had about building the JDK some number of weeks ago.
If you just want to install a package, and you have an Internet connection, you do not need to know the dependency structure. All you need to do is set the PKG_PATH environment variable and run pkg_add. All dependencies will be automatically installed.
jggimi is right. Unless Internet access is not available, there is no reason to manually download all packages before installing. Studying Section 15 of the FAQ will help clarify both the intent & usage of the package system:
http://openbsd.org/faq/faq15.html
ai-danno
07-31-2008, 05:05 AM
bsdnewbie999, are you concerned about the dependencies for a package (in your case, eclipse) because one of them fails to install correctly? If there is a dependency that fails to install, it should be telling you which one.
Now if you still want to view dependencies for a particular package, and your PKG_PATH is set, use the "-S" option on pkg_info. Here's how:
1) Find the proper name of the package for the application you want to see dependencies for (we'll use snort.)
# pkg_info -Q snort
p5-Net-Snort-Parser-1.21p0
snort-2.8.0.1
snort-2.8.0.1-mysql
snort-2.8.0.1-postgresql
snort-2.8.0.1-prelude
2) Use the proper package name to check that package's dependencies. Let's choose snort-2.8.0.1-mysql (because regular snort isn't fun enough, we want the version of snort that logs its results to a mysql database.)
# pkg_info -S snort-2.8.0.1-mysql
Information for ftp://ftp.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386/snort-2.8.0.1-mysql.tgz
Signature: snort-2.8.0.1-mysql,c.43.0,lib/mysql/mysqlclient.18.0,m.2.3,mysql-client-5.0.51a,pcap.5.0,pcre-7.6,pcre.2.1,z.4.1
And voila! Dependencies listed in all their stunning glory.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.