6

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.

3
  • 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! Commented Jun 20, 2011 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 Commented Jun 20, 2011 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. Commented Jun 20, 2011 at 14:41

3 Answers 3

1

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.

0

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.

7
  • I tried with the prefix and nothing changed. Not sure what you mean about excluding parts of the install. Commented Jun 17, 2011 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? Commented Jun 17, 2011 at 15:48
  • Exact same error. I think it just doesn't use the flag. Commented Jun 17, 2011 at 15:49
  • maybe --prefix=/home/username/my_postgres? Commented Jun 17, 2011 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. Commented Jun 17, 2011 at 15:55
0

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.

3
  • 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. Commented Jun 20, 2011 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. Commented Jun 21, 2011 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. Commented Oct 20, 2011 at 16:55

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.