Could not find /usr/ports/Mk/bsd.port.mk

Could not find /usr/ports/Mk/bsd.port.mk

I encountered the above error message when trying to install a port.  This is how
I fixed the above.

The above error message appeared mainly because I didn’t have a full
install on my machine.  I had done a minimal installation.  I did not install
the ports distribution, which requires about 400M (I think, I can’t recall the
figure). 

kennett# cd /usr/ports
kennett# mkdir Mk
kennett# cd Mk
kennett# fetch -p ftp://ftp.freebsd.org/.2/FreeBSD/branches/-current/ports/Mk/bsd.port.mk
Receiving bsd.port.mk (75202 bytes): 100%
75202 bytes transfered in 28.3 seconds  (2.59 Kbytes/s)
kennett# fetch -p ftp://ftp.freebsd.org/.2/FreeBSD/branches/-current/ports/Mk/bsd.port.post.mk
Receiving bsd.port.post.mk (124 bytes): 100%
124 bytes transfered in 0.3 seconds  (371 bytes/s)
kennett# fetch -p ftp://ftp.freebsd.org/.2/FreeBSD/branches/-current/ports/Mk/bsd.port.pre.mk
Receiving bsd.port.pre.mk (125 bytes): 100%
125 bytes transfered in 0.4 seconds  (293 bytes/s)
kennett# fetch -p ftp://ftp.freebsd.org/.2/FreeBSD/branches/-current/ports/Mk/bsd.port.subdir.mk
Receiving bsd.port.subdir.mk (4351 bytes): 100%
4351 bytes transfered in 0.4 seconds  (11.83 Kbytes/s)

If you should happen to get a message such as this:

fetch: ftp.freebsd.org: Not logged in

because the server was probably full and was not allowing any more connections.

After you do the above, you should be able to compile.  But be warned, you may get
the fetch: illegal option -- A error.  But don’t worry.  Full
instructions to fix that are here.

Leave a Comment

Scroll to Top