command ‘x86_64-linux-gnu-gcc’ failed with exit status in Python Django project

Typical error when a library that you want to install needs to compile and use some system libraries.

First make sure you have:



apt get install python

Other libraries that could be needed:

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev



Add Sublime as default editor on Linux

Sublime Text is an awesome text editor. If you’ve never heard of it, you should check it out right now.

I’ve made this tutorial because there’s no installer for the Linux versions of Sublime Text. While that’s not a real problem, I feel there is a cleaner way to go around this. Also, this post will show you how to integrate Sublime Text to Unity (which, I’m glad to report, has now matured into a fully functional user interface).

So let’s get on with this. Here is my how to install Sublime Text on Ubuntu tutorial.


Step 1

Download the tarfile that suits you best and extract it. Here’s the command to extract tar.bz2 files:


1.tar xf Sublime\ Text\ 2.0.1\ x64.tar.bz2

You’ll notice that I got the 64-bit version. The reason is that it’s lightning fast. So, go for that if you can!

Step 2

You’ll get a “Sublime Text 2″ folder after extraction. This folder contains all the files that Sublime Text will need. So we have to move that folder somewhere more appropriate. Like the “/opt/” folder :


1.sudo mv Sublime\ Text\ 2 /opt/

Step 3

At some point you’d want to be able to call Sublime Text from the Terminal by just typing “sublime”. To do that, we’ll just create a symbolic link in “/usr/bin” like thus:


1.sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime

Step 4

Now that our files are at the right place, we need to create a launcher in Unity. To do this, we’re going to create a .desktop file in “/usr/share/applications”:


1.sudo sublime /usr/share/applications/sublime.desktop

And paste the following content:


01.[Desktop Entry]
03.Name=Sublime Text 2
04.# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
05.# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
06.GenericName=Text Editor
10.Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png
15.[NewWindow Shortcut Group]
16.Name=New Window
17.Exec=sublime -n

As you can see, these lines are quite straightforward. Go ahead and experiment a bit with them.

Step 5

Now you would probably want to open all text files with Sublime Text 2. The easiest way to do that is to open up the file associations list:


1.sudo sublime /usr/share/applications/defaults.list

And replace all occurrences of gedit.desktop with sublime.desktop.


Taken from:

How to install Sublime Text 2 on Ubuntu 12.04 (Unity)

Linux: Add a folder to the PATH

I had to compile a separated version of python to run some software without remove the current version that is dependent of other applications inside the server.

When I tried to install some other dependent libraries of this version of python, It was not found because binary folder was not in the path.

To add the binary folder temporary I did in this way:

Before add it, the PATH looked like this:

$ echo $PATH


To add the folder to my PATH you just need to update the value of path in this way:

$ PATH=$PATH:/usr/local/python2.7/bin
Now if you print again the PATH values you will se something like this:

$ echo $PATH