make buildworld cd: can’t cd to /usr/src/tools/build/make_check Error and Solution

in Categories , , , , last updated June 7, 2009

‘m trying buildworld under FreeBSD operating system. But I’m getting an error which read as follows:

————————————————————–
>>> Building an up-to-date make(1)
————————————————————–
cd: can’t cd to /usr/src/usr.bin/make
*** Error code 2

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

How do I fix this problem?

You need upto date FreeBSD source tree. Type the following command to fetch FreeBSD src tree:
# cp /usr/share/examples/cvsup/standard-supfile /root/standard-supfile
# vi /root/standard-supfile

Set default host as follows:
*default host=cvsup4.us.FreeBSD.org
Save and close the file. Now get source code, enter:
# cvsup /root/standard-supfile
To build system use regular commands:
# make clean && make buildworld
# make buildkernel KERNCONF=kernelname
# make installkernel KERNCONF=kernelname

See how-to: Update The FreeBSD From Previous Releases Using Source Code (CVSUP method) for details about building world and install a new kernel under FreeBSD operating system.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Share this on (or read 1 comments/add one below):