tags:

views:

345

answers:

2

Hi,

I'm trying to install python to a 1and1.com shared linux hosting account.

There is a nice guide at this address: http://www.jacksinner.com/wordpress/?p=3

However I get stuck at step 6 which is: "make install". The error I get is as follows:

(uiserver):u58399657:~/bin/python > make install
Creating directory /~/bin/python/bin
/usr/bin/install: cannot create directory `/~’: Permission denied
Creating directory /~/bin/python/lib
/usr/bin/install: cannot create directory `/~’: Permission denied
make: *** [altbininstall] Error 1

I look forward to some suggestions.

UPDATE:

Here is an alternative version of the configure step to fix the above error, however this time I'm getting a different error:

(uiserver):u58399657:~ > cd Python-2.6.3
(uiserver):u58399657:~/Python-2.6.3 > ./configure -prefix=~/bin/python
configure: error: expected an absolute directory name for --prefix: ~/bin/python
(uiserver):u58399657:~/Python-2.6.3 >
+4  A: 

The short version is, it looks like you've set the prefix to /~/bin/python instead of simply ~/bin/python. This is typically done with a --prefix=path argument to configure or some other similar script. Try fixing this and it should then work. I'd suggest actual commands, but it's been a while (hence my request to see what you've been typing.)

Because of the above mistake, it is trying to install to a subdirectory called ~ of the root directory (/), instead of your home directory (~).

EDIT: Looking at the linked tutorial, this step is incorrect:

./configure --prefix=/~/bin/python

It should instead read:

./configure --prefix=~/bin/python

Note, this is addressed in the very first comment to that post.

EDIT 2: It seems that whatever shell you are using isn't expanding the path properly. Try this instead:

./configure --prefix=$HOME/bin/python

Failing even that, run echo $HOME and substitute that for $HOME above. It should look something like --prefix=/home/mscharley/bin/python

Matthew Scharley
Thank you for the reply Matthew!I tried the fix but had another error. I posted the error above in the original post as an update.
Haluk
(uiserver):u58399657:~ > ~/bin/python/pythonPython 2.6.3 (r263:75183, Oct 18 2009, 08:31:15)[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> print "Thank you Matthew!"Thank you Matthew!
Haluk
A: 

You really should consider using the AS binary package from Activestate for this kind of thing. Download the .tar.gz file, unpack it, change to the python directory and run the install shell script. This installs a completely standalone version of python without touching any of the system stuff. You don't need root permissions and you don't need to mess around with make.

Of course, maybe you are a C/C++ developer, make is a familiar tool and you are experienced at building packages from source. But if any of those is not true then it is worth your while to try out the Activestate AS binary package.

Michael Dillon