This tool simplifies fetching the latest version of a package from compatible sites to be as simple as
# pkg-get install gcc
This will automatically download the appropriate version for your architecture and OS revision (if available), and install the package. If you have an older version of the package already installed, using 'upgrade' instead of 'install' will replace the older version with a newer one, if available.
If the archive supports dependencies, pkg-get will also download any needed dependencies. For example
pkg-get install mod_phpshould triger an automaticpkg-get install apachewhich in turn should automatically triggerpkg-get install openssl
A site that supports these dependencies is
The last I am aware of, sunfreeware.com does not support dependencies. That means that if you use "pkg-get install apache", it could not automatically pull in any libraries that apache may depend on from sunfreeware.com
Here's some sample output:
junior# pkg-get compare software localrev remoterev aalib [Not installed] 1.2 apache [Not installed] 1.3.9 autoconf [Not installed] 2.13 automake [Not installed] 1.4 bash [Not installed] 2.03 bison [Not installed] 1.28 bzip2 [Not installed] 0.9.0c cvs [Not installed] 1.10.7 emacs [Not installed] 20.4 enscript [Not installed] 1.6.1 expect [Not installed] 5.32 flex [Not installed] 2.5.4a gawk [Not installed] 3.0.4 gcc 2.95.2 SAME gdb [Not installed] 4.18 ... ... ...
If you dont want to see the local status of packages, but just see what is available for download, "pkg-get available" will print out just the software name and remote revision available.
With pkg-get v2.0, you can also see a list of software descriptions, for
sites that provide a '
$ pkg-get describe # (Descriptions from site ibiblio.org ) aalib - Ascii art graphics library achievo - Project Management tool, in PHP apache - apache webserver with mod_ssl included autoconf - GNU auto-configuration tool automake - GNU makefile autogenerator tool berkeleydb3 - file based pseudo-database library berkeleydb4 - embedded database libraries and utilities binutils - GNU 'binary utilities': gas, gld, gprof, and others bison - GNU yacc parser generator ccache - Compiler Cache caches gcc output files cdrtools - tools for ripping from and recording to CDs and DVDs common - common files and dirs for CSW packages ....
You can even search for things using regular expressions
# ( -D is synonymous with describe ) $ pkg-get -D '^g.. ' # (Descriptions from site ibiblio.org ) gdb - The GNU Debugger gm4 - GNU m4 Unix macro processor gtk - the Gimp ToolKit library, libgtk
To adjust the config file, you may first have to
pkg-get' by itself to generate a default configuration file.
[basedir]/etc/pkg-get.conf in your favourite editor and
follow the directions in it to tell wget to go thorugh the ftp proxy, if it
is not already configured to do so.
[basedir] will only be meaningful if you have installed pkg-get to
somewhere other than /usr/bin. For example, if pkg-get is in
/opt/csw/bin/pkg-get, then the config file will be in
To temporarily change the site you connect to,
(if the main site is down or slow, for example)
specify an alternate siite with
pkg-get -s ftp://tmp.site/path/url.
Note that you'll have to first run
to get the catalog for that site, before you can use the 'install' subcommand.pkg-get -s ftp://tmp.site/path/url -U
To make your own software archive for pkg-get, you can use the makecontents script. This is currently only for the "old(v1) format". Contents file format looks like the following:
|Version||Line format spec|
|v1||softname version PKGname filename md5sum|
|v1||softname version PKGname filename md5sum bytecount dependancy1|dependancy2|... category1|category2|
v2 format notes:
If you want to try downloading JUST the script itself, without a nice
package around it, you can download it
here.(currently, the v4 initial release).
If you choose this route, I will presume that you know what you are doing, and dont need any futher explanations.
pkg-get v4.2 in script form, can be directly downloaded from
Once downloaded, you will probably wish to create a pkg-get.conf file to tell it which site to default pulling packages from.
The script is somewhat reloctable. If you put it in /usr/local/bin, it will look to /usr/local/etc to find pkg-get.conf.
# This goes in pkg-get.conf url=http://mirror.opencsw.org/opencsw/stablerun '
pkg-get -U' to initialize the local catalog of available packages. , after tweaking the url in pkg-get.conf to wherever you wish to pull from. Then you're all set to go!
|If you would prefer a more menu-driven approach than pkg-get's pure commandline interface, you may try pkgadm. The download page also has a screenshot of what it looks like in comparision. Unfortunately, it has not been updated since 2003. Thus, pkg-get has more features. But anyone is welcome to try improving pkgadm! It's a script, so you can modify it yourself.|
Please visit The CSW package site, http://www.opencsw.org, to see the latest in binary packages for Solaris.
http://www.opencsw.org also hosts downloads for pkg-get v3