0

I have no idea what I'm doing wrong when following the instructions here:

http://odoo-development.readthedocs.org/en/latest/install.html. Can you please help me out?

The command that causes the error is:

$ sudo pip install -r requirements.txt

Here is the error:

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Can't roll back Pillow; was not uninstalled Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-rlHphv/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-B4QpIV-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-rlHphv/Pillow Storing debug log for failure in /home/aaa/.pip/pip.log

Here are the commands I'm entering in order:

-VirtualBox:~$ sudo apt-get update
-VirtualBox:~$ sudo apt-get install git python-pip htop moreutils tree nginx gimp wmctrl postgresql-server-dev-all
-VirtualBox:~$ sudo apt-get upgrade
-VirtualBox:~$ mkdir bmp
-VirtualBox:~$ cd bmp
-VirtualBox:~/bmp$ sudo git clone https://github.com/odoo/odoo.git
-VirtualBox:~/bmp$ ls
-VirtualBox:~/bmp$ cd odoo
-VirtualBox:~/bmp/odoo$ ls
-VirtualBox:~/bmp/odoo$ cd .
-VirtualBox:~/bmp/odoo$ cd ..
-VirtualBox:~/bmp$ wget http://nightly.odoo.com/8.0/nightly/deb/odoo_8.0.latest_all.deb
-VirtualBox:~/bmp$ sudo dpkg -i odoo_8.0.latest_all.deb
-VirtualBox:~/bmp$ sudo apt-get -f install
-VirtualBox:~/bmp$ sudo apt-get remove odoo
-VirtualBox:~/bmp$ ls
-VirtualBox:~/bmp$ cd /usr/local/src
-VirtualBox:/usr/local/src$ lsb_release -a
-VirtualBox:/usr/local/src$ uname -i
-VirtualBox:/usr/local/src$ sudo apt-get install xfonts-base xfonts-75dpi
-VirtualBox:/usr/local/src$ sudo apt-get -f install
-VirtualBox:/usr/local/src$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
-VirtualBox:/usr/local/src$ sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
-VirtualBox:/usr/local/src$ sudo dpkg -i wkhtmltox-*.deb
-VirtualBox:/usr/local/src$ cd ~/bmp/odoo
-VirtualBox:~/bmp/odoo$ sudo pip install -r requirements.txt

I have posted all the logs here: http://pastebin.com/xbbAkPzy. At this point any help would be very much appreciated.

user3605445
  • 75
  • 1
  • 1
  • 5
  • From the logs it appears the compilation fails on missing `Python.h`. Maybe [see here](http://stackoverflow.com/questions/8282231/ubuntu-i-have-python-but-gcc-cant-find-python-h). – Kenney Feb 03 '16 at 01:00
  • The problem is the system I'm trying to install odoo on is Ubuntu 15.1. and when I type $ python the following shows: Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] on linux2 Type "help", "copyright", "credits" or "license" for more information. – user3605445 Feb 03 '16 at 05:57
  • and when I do: `~$ sudo locate python.h` it finds python.h here: /usr/include/dbus-1.0/dbus/dbus-python.h /usr/share/doc/python/python-policy.html/ch-python.html – user3605445 Feb 03 '16 at 06:03
  • It's case sensitive (`Python.h`). The file should be somewhere in `/usr/include/python.../`. The Top answer in that link lists the commands for Ubuntu (it doesn't matter if it's 15.1 or 15.10 or any other version - it's Debian based and so uses `apt-get` which works the same across all versions). Even though you have the python runtime installed, you'll still need the `...-dev` packages for the include headers to be able to compile for it. So just `apt-get install` those packages listed and it should get you a bit further along in the compilation process. – Kenney Feb 03 '16 at 13:22

2 Answers2

1

Then i have tried below code work like charm

sudo apt-get install build-essential libssl-dev libffi-dev python-dev
Hardik Gajjar
  • 1,024
  • 12
  • 27
0

They are available in -dev or -devel packages for Python, Postgres, libxml2, libxslt, libevent, libsasl2 and libldap2. Then the Python dependencies can themselves be installed.

Rick Smith
  • 9,031
  • 15
  • 81
  • 85
Srok
  • 37
  • 4