LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 04-19-2002, 06:19 PM   #1
rsbecker007
Member
 
Registered: Dec 2001
Posts: 39

Rep: Reputation: 15
FreeBSD Package Manager


Is there one?

The reason I ask is that I just installed FreeBSD 4.5 and wanted to use lynx, but it wasn't installed. I found a .tgz file in the packages subdir of the first CD for lynx. I uncompressed it and found subdirs that I could manually place, but it would seem to me that there would be a package manager since it is in the packages subdir...
 
Old 04-19-2002, 06:30 PM   #2
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Rep: Reputation: 30
Not sure how FreeBSD does it, but Open- has both a package manager and a ports tree. The package management commands are pkg_add, pkg_delete, and pkg_info, to name a few. The .tgz files are precompiled packages that you can install with pkg_add <pkgname.tgz>.

Check the online FAQ or user's manual or try the man command to search for a keyword:
Code:
man -k pkg
might show you what you want.
 
Old 04-19-2002, 06:48 PM   #3
rsbecker007
Member
 
Registered: Dec 2001
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks!

that really helped a lot, thanks!
 
Old 04-19-2002, 08:48 PM   #4
shakazulu
LQ Newbie
 
Registered: Apr 2002
Posts: 8

Rep: Reputation: 0
pkg_add

FreeBSD has a slightly schizophrenic package system (mostly due to their somewhat independent evolution).

If you have the lynx.tgz file like you say then that is a package and you do

pkg_add lynx.tgz

(this will complain if the dependencies are not installed)

If you do not have lynx.tgz you can do

pkg_add -r lynx.tgz

and it will try to download it and its dependencies.

The easiest way I have found to get something and its dependencies installed off the CD is to unmount it, and then do
/stand/sysinstall
then select Configuration
then select Packages
then select the CD/DVD distro option
then select www
then select lynx

This -should- ensure that the package and its dependencies all come in.

Lastly, if (and it does happen) that the .tgz file cannot be found online or on CD, then you can do

cd /usr/ports/www/lynx

and type

make
make install
make package (optionally make a .tgz file)

which will download source and compile. Additionally, the make might give you options to set to get alter the compile (for example, the mplayer port has to be told to make with libdecss).

BTW if you did not know the right directory to go to you can type

whereis lynx

or

cd /usr/ports
make search key=lynx

Now one big diff between OpenBSD and FreeBSD is that OpenBSD automatically creates the .tgz packages and then does a package install of the .tgz file. I think that's a lot nicer and neater, because it essentially reduces all pkg installation to a call pkg_add, so there is less chance for the pkg commands to clobber the port commands and vice versa (which theoretically can happen, but doesn't).


Bottom line, use ports and pkg whenever possible. Don't just do the untar, config, make business if you want to keep you pkg database coherent.
 
Old 04-20-2002, 02:54 PM   #5
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Rep: Reputation: 30
while on the subject, i don't know if FBSD takes care of it, but when installing a port, you can specify the 'make clean' option at the end. Reason being, if you leave a downloaded and compiled package sitting around on your system in ports, it's gonna take up space. multiply this by several ports you've built, you're going to have a lot of wasted space and have fun tracking it down
Make clean takes the port back to its original (small) pre-built size.
 
Old 04-21-2002, 02:01 PM   #6
cvig
LQ Newbie
 
Registered: Apr 2002
Location: Chicago
Posts: 5

Rep: Reputation: 0
portupgrade

Check out portupgrade too. It is simply wonderful. Say you have 15 packages installed and 5 are out of date. Running portupgrade -ra will upgrade all those packages and their dependencies. The downside is the length of time it takes to update the db portupgrade uses (portsdb -Uu) but considering it requires no interaction and only needs to be run once a week I find portupgrade to be wonderful.

Remember to add the WITHOUT_X11 option to /etc/make.conf (man make.conf) if you don't want to build any of the X11 stuff or specify it on the command line with portupgrade -ra -m "-DWITHOUT_X11".

Michael Lucas has an excellent article on portupgrade:
http://www.onlamp.com/pub/a/bsd/2001...y_Daemons.html

Check out his other articles in the Big Scary Daemons section:
http://www.onlamp.com/pub/ct/13

Good stuff.
 
Old 04-25-2002, 03:29 AM   #7
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Rep: Reputation: 30
as root
/stand/sysinstall
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
latex2e package unavailable in package manager or apt-get cesine Debian 2 07-11-2006 02:31 PM
A few FreeBSD package questions reddazz *BSD 22 05-06-2005 05:13 PM
X package manager monohouse Linux - Software 6 12-15-2004 01:14 AM
Package manager - all in one gokul Fedora 17 12-13-2004 09:15 PM
package management in freebsd h/w *BSD 1 02-06-2004 06:35 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration