Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I specifically need version 9.1.4 --- unfortunately there are no ifs, ands, or buts. It's not my decision.

I have downloaded the .run file available from PostgreSQL's SourceForge listing, but I can't seem to be able to install it. Unlike other run files out there that I've seen, this one is a binary. Every attempt at Googling returns countless kiddie forum posts instructing OP to execute the file with bash. When I merely attempt to double-click, it responds with the error

Couldn't display "/root/postgresql-9.1.4-1-linux-x64.run".

So, I am very curious as to what this particular .run file is, but my primary goal is to install PostgreSQL 9.1.4 on RHEL 5. If an RPM is available, I would love you forever; over two hours' Googling has produced nothing.


After ensuring the file was executable, I receive this error (after a lovely PostgreSQL splash screen):

Error running /tmpprerun_checks.sh : /bin/sh: /tmp/prerun_checks.sh: /bin/sh: bad interpreter: Permission denied [OK]

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Have you tried running it from the command line? Open your favorite terminal program, authenticate as root (if you haven't already), then enter the following (the # shouldn't be typed, it's just a placeholder for the prompt):

# cd /root
# chmod +x postgresql-9.1.4-1-linux-x64.run
# postgresql-9.1.4-1-linux-x64.run

EDIT

You can google the error for yourself, but there are a couple of options. One is that /tmp may be mounted as noexec. Type man mount and check the options to remount it without that option. You can also try to chown root postgresql-9.1.4-1-linux-x64.run and see if that works.

Another potential issue may be with the file's encoding. If you downloaded it in windows, then copied it to Linux, or if you downloaded it from a mis-configured Windows server, it may have CR/LF line endings instead of the Unix standard LF-only newline. There's a utility called dos2unix that may help, if the file is plain text, but make sure you make a backup before trying it, as it may contain binary data as well.


In summary:

# mount -o remount exec /tmp
# chmod +x postgresql-9.1.4-1-linux-x64.run
# ./postgresql-9.1.4-1-linux-x64.run
# mount -o remount noexec /tmp
share|improve this answer
    
Done, see edit. –  Sean Allred Jun 14 '13 at 17:26
    
please see above –  MattDMo Jun 14 '13 at 17:41
1  
I just downloaded the file, and it looks like it's binary-only, so don't run dos2unix on it! –  MattDMo Jun 14 '13 at 17:44
    
You jogged my memory. I had installed this before, and it was indeed that /tmp/ was mounted as noexec. I only needed to remount it as exec, run setup, and then remount as noexec. Would you mind terribly if I edited this into your answer when I solidify the process? –  Sean Allred Jun 14 '13 at 17:45
    
sure, go for it... –  MattDMo Jun 14 '13 at 17:47
add comment

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.