The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
fetch: illegal option -- A 19 March 1999
Need more help on this topic? Click here
This article has no comments
Show me similar articles
This article talks about the above error and how I corrected it.

I was in the midst of installing Lynx from the internet, when I encountered some problems along the way.

kennett# make
"/usr/share/mk/bsd.port.mk", line 2: Could not find 
                                        /cdrom/ports/Mk/bsd.port.mk
make: fatal errors encountered -- cannot continue

That's when I remembered I had added a Shortcut for compiling from CD-ROM.  I reversed this out and then tried again.  That's when I encountered the following error:

"/usr/share/mk/bsd.port.mk", line 2: Could not find 
                                          /usr/ports/Mk/bsd.port.mk
make: fatal errors encountered -- cannot continue

The solution for that error is here.

After I fixed that, I encountered a different error:

fetch: illegal option -- A
usage: fetch [-DHILMNPRTVablmnpqrstv] [-o outputfile] [-S bytes]
             [-f file -h host [-c dir] | URL]
>> Attempting to fetch from 
                   ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/.
fetch: illegal option -- A
usage: fetch [-DHILMNPRTVablmnpqrstv] [-o outputfile] [-S bytes]
             [-f file -h host [-c dir] | URL]
>> Couldn't fetch it - please try to retrieve this
>> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1

Stop.

The problem was that I was using the current bsd.port.mk but an older fetch binary which did not support the -A switch that bsd.port.mk was trying to use.  So I needed the upgrade kit as specified at http://www.freebsd.org/ports/.

Here's what I did to fix the above:

cd /usr/ports
fetch -p 
     ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-3-stable/
                                                 Latest/31upgrade.tgz
pkg_add 31upgrade.tgz
cd www/lynx

Need more help on this topic? Click here
This article has no comments
Show me similar articles