# Jail - there is no /usr/src/etc



## bsus (Jul 15, 2011)

Hi, I want to set up a jail for a FAMP service (FreeBSDApacheMySQLPHP).
But already by the first step it begins to fail:

```
# mkdir /home/j /home/j/mroot
# cd /usr/src
# make installworld DESTDIR=/home/j/mroot

mkdir -p /tmp/install.m4GaT6da
progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown  date echo egrep find       grep install-info  ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl  test       true uname wc zic; do  if progpath=`which $prog`; then  echo $progpath;  else        echo "Required tool $prog not found in PATH." >&2;  exit 1;  fi;  done);  libs=$      (ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line;       do  set -- $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Re      quired library $1 not found." >&2;  exit 1;  fi;  done);  cp $libs $progs /tmp/i      nstall.m4GaT6da
cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.m4GaT6da/locale
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=amd64  MACHINE=amd64  CPUTY      PE=  GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/ob      j/usr/src/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/      legacy/usr/share/tmac PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src      /tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/u      sr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install      .m4GaT6da  LD_LIBRARY_PATH=/tmp/install.m4GaT6da  PATH_LOCALE=/tmp/install.m4GaT      6da/locale make -f Makefile.inc1 __MAKE_SHELL=/tmp/install.m4GaT6da/sh reinstall      ;  MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=amd64  MACHINE=amd64  CPUTYPE=  GROFF      _BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/usr/src/      tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr      /share/tmac PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legac      y/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/u      sr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.m4GaT6da        LD_LIBRARY_PATH=/tmp/install.m4GaT6da  PATH_LOCALE=/tmp/install.m4GaT6da/locale       rm -rf /tmp/install.m4GaT6da
--------------------------------------------------------------
>>> Making hierarchy
--------------------------------------------------------------
cd /usr/src; make -f Makefile.inc1 hierarchy
cd /usr/src/etc;                make distrib-dirs
cd: can't cd to /usr/src/etc
*** Error code 2

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

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

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

Stop in /usr/src.
```

How can I now get/create a /usr/src/etc? and why doesn't I have it?

Regards


----------



## SirDice (Jul 16, 2011)

You need to buildworld before you can installworld.


----------



## bsus (Jul 16, 2011)

```
make buildworld DESTDIR=/home/j/mroot
cd: can't cd to /usr/src/tools/build/make_check

--------------------------------------------------------------
>>> 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.
```


----------



## fbsd1 (Jul 16, 2011)

You should try the qjail port. It will greatly simplify jail admin for you.


----------



## bsus (Jul 16, 2011)

Has this to do with the /usr/src which I can install via sysinstall?


----------



## SirDice (Jul 18, 2011)

It looks like you don't have a complete source tree.


----------



## bsus (Jul 19, 2011)

Yep this was it...

I now have my jail running my question is now how i can install as example apache over ports?


----------



## DutchDaemon (Jul 19, 2011)

Different topic, post question in the correct forum. And installation of ports is covered in The Handbook.


----------

