Compiling C programs

Hi, I’m trying to compile/install various C scripts on my dreamhost account. Let’s take for example Freetype 2. I start by running:


This completes without any apparent errors. Then I run:


Many lines fly by, and upon inspection it appears this also complete without errors. Then I run:

make install

This produces this error, which I have no idea how to circumvent:

./builds/unix/mkinstalldirs /usr/local/lib
mkdir -p – /usr/local/lib/pkgconfig /usr/local/include/freetype2/freetype/config /usr/local/include/freetype2/freetype/cache /usr/local/bin /usr/local/share/aclocal
mkdir: cannot create directory /usr/local/lib/pkgconfig': Permission denied mkdir: cannot create directory/usr/local/include/freetype2’: Permission denied
mkdir: cannot create directory /usr/local/include/freetype2': Permission denied mkdir: cannot create directory/usr/local/share/aclocal’: Permission denied
make: *** [install] Error 1

Any ideas? Many thanks in advance!

Those messages are telling you that you can’t create/write to the various /usr/local/*, which is correct, because they are owned by root, and are for the common use of all users on your box.

You will not be able to add things to those directories.

PHP5 on Dreamhost in already configured with Freetype 2.17 enabled. Is there a reason you can’t just use that?.


try passing options to config like --prefix or --dir (you need to make the install on your own dirs not system wide)
./configure --help

yeah, i was using the --prefix option at one point and also got the errors. what i did was basically create a new directory in my base directory called “freetype” and then pass that through in the --prefix option. it would resolve some errors but not all. i will repost some error messages in just a bit. thanks for everyone’s help.