Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

There is a postgres instance, and I have the ability to build my own instance.

Using these instructions I ran:

USE_PGXS=1 make

which worked but then

USE_PGXS=1 make install

did not, with this error:

/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/mkinstalldirs '/usr/lib64/pgsql'
mkdir -p -- /usr/share/pgsql/contrib
mkdir: cannot create directory `/usr/share/pgsql/contrib': Permission denied
make: * [installdirs] Error 1

Ideally I'd want to install this locally, but I do not know if that is possible.

I am on RedHat 5.

share|improve this question
    
Hey @A Question Asker: have you been back to try this with the either Chance's answer or the argument order he helped me fix in my answer. It would be nice to know results to the problem so we know if we fixed it or need to keep thinking! –  Caleb Jun 20 '11 at 11:38
    
Caleb, I will update the comments. Thanks for the reminder, I always assume that if an answer isn't found in a couple of hours, nobody will read the q anymore –  A Question Asker Jun 20 '11 at 14:36
    
That's definitely not the case. There are many mechanisms for finding un-answered questions, even specific to a given interest. Also the SE sites periodically promote old un-answered questions to the home page or shows them to people who statistically might be interested. I've seen years-old questions get answers. –  Caleb Jun 20 '11 at 14:41
    
Great to know, thank you. –  A Question Asker Jun 20 '11 at 14:43

3 Answers 3

The pl/R list would probably be a better place to ask if you get stuck. Joe Conway also answers questions there. From a quick compile of the pl/R Debian package, it seems like you want to pass a DESTDIR argument to make. Something like

make DESTDIR=/home/...

Here is the make line from the Debian package

USE_PGXS=1 PG_CONFIG=/usr/lib/postgresql/8.4/bin/pg_config /usr/bin/make  -C . \   
CFLAGS="-g -Wall -O2" CXXFLAGS="-g -Wall -O2" CPPFLAGS="" LDFLAGS="" \
-I/usr/share/R/include PG_CPPFLAGS=-I/usr/share/R/include

and here is the make install line

USE_PGXS=1 PG_CONFIG=/usr/lib/postgresql/8.4/bin/pg_config /usr/bin/make  -C . \
CFLAGS="-g -Wall -O2" CXXFLAGS="-g -Wall -O2" CPPFLAGS="" LDFLAGS=""  USE_PGXS=1 \   
R_HOME=/usr/lib/R install DESTDIR=debian/tmp/

As you can see, there are a lot of other parameters you may want to set. Personally, I'd try to sweet talk your sys admin into installing a binary.

share|improve this answer

I think you will need to run make with some extra options to specify the location where the software will be installed, probably somewhere in your home folder. You might also have to exclude parts of the install that do things like marking daemons to be run on system startup since your user won't be able to do that.

make prefix=/home/username/my_postgres install

See the documentation for make for some more common values that you can set.

share|improve this answer
    
I tried with the prefix and nothing changed. Not sure what you mean about excluding parts of the install. –  A Question Asker Jun 17 '11 at 15:44
    
Did you make sure the directory you specified as the prefix existed? What was the error this time? Did you try specifying the prefix on the make instead of the make install? –  Caleb Jun 17 '11 at 15:48
    
Exact same error. I think it just doesn't use the flag. –  A Question Asker Jun 17 '11 at 15:49
    
maybe --prefix=/home/username/my_postgres? –  Chance Jun 17 '11 at 15:50
    
Actually @Chance from the documentation looks like you only use the dash version of that argument with configure, not with make, but the argument order might matter. @A Question Asker: See my edited answer. –  Caleb Jun 17 '11 at 15:55

Is there a configure command in the untarred directory?

With some software you can run ./configure --prefix=/home/yourname/some_directory

followed by make and make install.

If anything, after you do your make you can manually copy executable files into your /home/username/bin directory or anywhere in your path. Library files can be copied into your /home/username/lib. Anything is possible under your home directory or directories of which you have ownership, it's just a matter of putting them in the right place.

share|improve this answer
    
There is no configure, sadly. I'm not sure about what should be copied, otherwise. I guess I'd have to do a local postgres install? Don't even know if that is possible. –  A Question Asker Jun 20 '11 at 14:37
    
@A Question Asker, perhaps you can edit the makefile to install in different paths. For instance, if you see a directory like /usr/local/bin, change to /home/username/bin, likewise for /usr/local/lib. –  Chance Jun 21 '11 at 14:35
    
I don't know why this was downvoted. As I stated in the answer ("some software"), this doesn't always work, but with many software packages it does. –  Chance Oct 20 '11 at 16:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.