Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2002 19:54:09 -0500 (CDT)
From:      Chris Wilmes <cwilmes@creighton.edu>
To:        Samuel Chow <samuelc@samuelstn.dhs.org>
Cc:        freebsd-newbies@FreeBSD.ORG
Subject:   Re: newbie-can't install ports
Message-ID:  <Pine.HPX.4.05.10206051925400.13387-100000@bluejay.creighton.edu>
In-Reply-To: <008f01c20cea$5ede4220$2784412f@ca.nortel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Jun 2002, Samuel Chow wrote:

> 
> > when I go to the /user/ports/ I see a bunch of files. Are these 
> > the files I compile to install the software? Or do I have to be 
> > connected to the internet to ftp the files because it keeps on 
> > getting the error message, "Couldn't fetch it - please try to 
> > retrieve this port manually into /usr/ports/distfiles/"
> 
>     The files you saw are just Makefiles, more like
>     instructions to the computer on how to compile
>     the port.  However, the actual source codes are
>     not there.  I believe they are on the CD set disc 3 
>     and 4 (someone correct me, I don't have the CD).  If 
>     you don't have the CD like me, then yes, you have to 
>     be connected to the Internet.
> 

I thought I might clarify this a little.  Not every FreeBSD CD is the
same.  Some have the source code (in the form of .tgz or .tar.gz), and
some don't.  Here's a little explanation from the FreeBSD Handbook:

"The FreeBSD Project's official CDROM images no longer include distfiles.
They take up a lot of room that is better used by precompiled packages.
CDROM products such as the FreeBSD PowerPak do include distfiles, and you
can order these sets from a vendor such as the FreeBSD Mall."

--snip--

"Place your FreeBSD CDROM in the drive. Mount it on /cdrom. (If you use a
different mount point, the install will not work.) To begin, change to the
directory for the port you want to install:

# cd /usr/ports/sysutils/lsof

Once inside the lsof directory, you will see the port skeleton. The next
step is to compile (also called build) the port. This is done by simply
typing make at the prompt. Once you have done so, you should see something
like this:

# make
>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in
/usr/ports/distfiles/.
    >> Attempting to fetch from file:/cdrom/ports/distfiles/.
    ===> Extracting for lsof-4.57
    ...
    [extraction output snipped]
    ...
    >> Checksum OK for lsof_4.57D.freebsd.tar.gz.
    ===> Patching for lsof-4.57
    ===> Applying FreeBSD patches for lsof-4.57
    ===> Configuring for lsof-4.57
    ...
    [configure output snipped]
    ...
    ===> Building for lsof-4.57
    ...
    [compilation output snipped]
    ...
    #

Take notice that once the compile is complete you are returned to your
prompt. The next step is to install the port. In order to install it, you
simply need to tack one word onto the make command, and that word is
install:

# make install
===> Installing for lsof-4.57
    ...
    [installation output snipped]
    ...
    ===> Generating temporary packing list
    ===> Compressing manual pages for lsof-4.57
    ===> Registering installation for lsof-4.57
    ===> SECURITY NOTE: 
          This port has installed the following binaries which execute
with
          increased privileges.
    #

Once you are returned to your prompt, you should be able to run the
application you just installed."

--end of cut-and-paste from Handbook---

An alternative method for those with second-hand access to the Internet
(but not on the computer in question), is to download the desired .tgz
files from your favorite FreeBSD ftp mirror onto a disk, copy the files
from the disk into your computer's /usr/ports/distfiles directory, and
then run "make install" from /usr/ports/applicationdir as usual.  It's a
real pain when you run into dependency problems with this method, but it
works well for small programs with no missing dependencies.

And to quickly answer another question you alluded to, the programs are
not installed in /usr/ports.  That directory only contains info about how
to install the program.  The binary files themselves are installed in
/usr/local/bin (unless you specify otherwise), the man pages for the new
programs in /usr/local/man, and so forth.

If you haven't already, please read Chapter 4 of the FreeBSD Handbook.
You'll be glad you did.

Sincerely,

Chris Wilmes



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.HPX.4.05.10206051925400.13387-100000>