Inside the apache directory? It looks like you've got your build path set up wrong? It's trying to do a bulid in your:
/var/apache/htdocs/pages
directory - unless this is where you've intentionally set it to be? Check your build path in the admin area and change it to point to your Links installation and build directory.
Cheers,
R.