Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed Xubuntu 13.04 #48

Closed
starlocke opened this issue Aug 12, 2013 · 8 comments
Closed

Build failed Xubuntu 13.04 #48

starlocke opened this issue Aug 12, 2013 · 8 comments

Comments

@starlocke
Copy link

Given a freshly installed Xubuntu 13.04 64-bit Virtualbox Guest, I also experience the following issue: #40

However, no matter which flavour of libreadline-dev I install onto the system, pyenv can't build the python readline extension.

Downloading Python-2.6.8.tgz...
-> http://yyuu.github.io/pythons/f6c1781f5d73ab7dfa5181f43ea065f6
Installing Python-2.6.8...

BUILD FAILED

Inspect or clean up the working tree at /tmp/python-build.20130812163804.11579
Results logged to /tmp/python-build.20130812163804.11579.log

Last 10 log lines:
(cd /home/victor/.pyenv/versions/2.6.8/bin; ln python2.6 python)
rm -f /home/victor/.pyenv/versions/2.6.8/bin/python-config
(cd /home/victor/.pyenv/versions/2.6.8/bin; ln -s python2.6-config python-config)
Creating directory /home/victor/.pyenv/versions/2.6.8/share/man
Creating directory /home/victor/.pyenv/versions/2.6.8/share/man/man1
/usr/bin/install -c -m 644 ./Misc/python.man \
                /home/victor/.pyenv/versions/2.6.8/share/man/man1/python.1
Traceback (most recent call last):
  File "<string>", line 4, in <module>
ImportError: The Python readline extension was not compiled. Missing the GNU readline lib?
@alfetopito
Copy link

I also face this issue to install python.

@yyuu I would suggest the installer detect first if required libraries are available and tell the user everything that is needed in order to complete the installation.

Here is what you have to install before trying to install python @starlocke
sudo apt-get install libreadline-dev libbz2-dev zlib1g-dev libssl-dev

It might be that you need something else, but those were all for me.

@yyuu
Copy link
Contributor

yyuu commented Aug 13, 2013

@alfetopito
pyenv even supports Python flavors other than CPython. Because the dependencies are depending on the Python flavor/version to build, checking dependencies is somewhat complicated.

I wrote pyenv-doctor to check dependencies before actual build. It might help this kind of situations.

@starlocke
Copy link
Author

@alfetopito -- so, you succeeded, using Xubuntu 13.04, 64-bit, fresh install ? If different, please clarify.

PS. I installed all those packages, too, since I read #40 and its solution was those packages (more or less)... still, didn't work for me... thus this report.

@yyuu
Copy link
Contributor

yyuu commented Aug 13, 2013

I tried to build 2.6.8 on fresh installation of Ubuntu 13.04 Server amd64, and succeeded. I used following script to setup pyenv.

#!/bin/bash -ex
sudo apt-get update
sudo apt-get install -y git build-essential zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
pyenv install -v 2.6.8

@starlocke
Please gist the output of pyenv install -v 2.6.8 2>&1.

@starlocke
Copy link
Author

build-essential ! I was lacking that debian package. The issue is resolved, but, I'd like to suggest that pyenv reports on missing pre-requisites and quit before going so far as making an attempt at "magic" (building/testing/installing). There's definitely a whole bunch of us who are unfortunately not very savvy with the whole "compile and install from source" methodology, myself included.

Thank you very much, @yyuu, for your awesome contribution to python ease-of-use! 👍 (PS. I don't think you need the output from the above script, at this point, right?)

@yyuu
Copy link
Contributor

yyuu commented Aug 13, 2013

@starlocke
Yep, you don't need to gist if you succeed to build.

As you written, the missing build dependencies must be the one of most big pitfall for pyenv users. I'd like to improve pyenv doctor command to notice users what is wrong.

@yyuu yyuu closed this as completed Aug 13, 2013
@starlocke
Copy link
Author

I haven't tried pyenv doctor, but I'm sure it deserves a mention in the pyenv main project's README.md 😄

@alfetopito
Copy link

Mine worked only with those libraries I mentioned because I didn't notice that build-essential was installed by other package.

@yyuu I didn't know about pyenv doctor, thanks for pointing it out.
And I agree with @starlocke that a mention on README would help us all on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants