How to install SublimeClang on Archlinux

SublimeClang is a cool and useful extension for SublimeText which enables IDE features for C++ programmers.
Here are the installation instructions for Linux from their github page.

There are two problems with the installation on Archlinux.

Problem A

SublimeText looks for Python 2.6. Archlinux has Python 3 and Python 2.7,


Step 1

Install python26 from AUR.

Step 2

Create a symlink to the new Python 2.6 installation in the right place for SublimeText to find, as root (sorry, I don’t know how to solve it without creating a symlink as root).

ln -s /lib/python2.6/ /opt/sublime-text/lib/python2.6

Problem B

When trying to build libcache the build environment won’t find and will try to build it and fail.


Copy the file to a place where it will be found.

cp /usr/lib/llvm/ ~/.config/sublime-text-2/Packages/SublimeClang

Now clean the build environment if needed and run the cmake and make commands as written in the instructions.

It should work now. Tested on Archlinux 64 bit.