From BlenderWiki

Jump to: navigation, search

Here you find information about how to build Blender on modern machines and distributions.

In case you're trying to build on old distributions, chances are that your package manager doesn't provide a recent Python, Collada, etc: in those special cases please have a look at the troubleshooting page

To have latest Blender successfully running on Linux system you follow few simple steps.

This is not as hard as most people would think if you follow these instructions.

  1. Install required package dependencies.
  2. Download Blender source.
  3. Compile Blender.

Install the dependencies

Automatic dependencies installation

Exclamation mark.png

The preferred way to install dependencies under Linux is now to use the script featured with Blender sources. It currently supports Debian (and derived), Fedora, Suse and Arch distributions. When using the script, you are only required to install the following dependencies:

sudo apt-get update; sudo apt-get install git build-essential

Then, get the sources and run as explained below.

To build with FFMPEG and Cycles enabled, various libraries are needed. These can be…

  • Installed through your distributions repositories.
  • Built manually.
  • Skipped (many dependencies are optional).
  • Managed by a script which checks for missing dependencies and installs them or compiles from sources.

The later solution is now the preferred one! Simply run:

cd ~/blender-git

This script works for Debian/Redhat/SuSE based distributions, both 32 and 64 bits.

This scripts accepts some optional command lines arguments (use --help one to get an exhaustive list), among which:

--source <path>
Where to store downloaded sources for libraries we have to build (defaults to ~/src/blender-deps).
--install <path>
Where to install the libraries we have to build (defaults to /opt/lib).
Try to build OpenShadingLanguage. Note that this is still considered as experimental!
Skip download and build OpenShadingLanguage.

Some commands in this script requires sudo, so you'll be likely asked couple of times for your password.

When the script finish installing/building all the packages, it'll print which parameters for CMake and SCons you should use to use compiled libraries.

Exclamation mark.png
If you have to compile your own boost libraries, you will have to tell Linux where to find them to get blender running. Just run the following commands as root user, from a terminal window:
echo "/opt/lib/boost/lib" > /etc/

Manual dependencies installation

To manually install Blender's dependancy packages:

sudo apt-get update; sudo apt-get install git build-essential \
 libxi-dev libsndfile1-dev \
 libpng12-dev libjpeg-dev libfftw3-dev \
 libopenexr-dev libopenjpeg-dev \
 libopenal-dev libalut-dev libvorbis-dev \
 libglu1-mesa-dev libsdl1.2-dev libfreetype6-dev \
 libtiff4-dev libavdevice-dev \
 libavformat-dev libavutil-dev libavcodec-dev libjack-dev \
 libswscale-dev libx264-dev libmp3lame-dev python3.4-dev \
 libspnav-dev libtheora-dev libjack-dev libglew1.6-dev

As a final note, here are the key libraries that you may want to use with Blender:

Python (3.4)
Needed for interface scripts (building without Python is supported but not meant for general use).
Boost (min 1.49)
Necessary for Cycles, OSL, Audaspace, Internationalization…
OpenColorIO (min 1.0)
Necessary to handle color spaces.
Necessary for Cycles and OSL (min 1.1 in this case).
LLVM (min 3.0)
Necessary for OSL.
Enable custom shaders under Cycles.
FFMPEG or libav (ffmpeg fork)
For handling most video formats/codecs.

Get the source

The first step is to get the latest Blender source code from's GIT repository.

Copy and paste the following instructions into a terminal window. The following commands create a blender-git folder in your home directory by downloading the latest source code commonly referred to as 'master'. An Internet connection is needed.

mkdir ~/blender-git
cd ~/blender-git
git clone
cd blender
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master

If you want to update your git clone checkout to the latest source do (in ~/blender-git/blender/):

git pull --rebase
git submodule foreach git pull --rebase origin master

For additional information on using Git with Blender's sources, see: Tools/Git

Compile Blender with Scons

Do I need to install Scons?

No, currently scons is embedded in Blenders' source code.

How do I configure Scons?

By default, Scons will pickup the right configuration file depending on your operating system (Linux, Mac, Windows, etc...) and architecture (32/64bit, etc). In the Blender source (see #Get the source above) these files are located in blender/build_files/scons/config/:

For example, if you are working on a 32bit machine with Linux, Scons will pickup to setup the Blender build.

If all the parameters in that file work for you, just start building Blender (see below).
If you don't have a system Python 3.2 and the package isn't available you may have to build your own and install to a custom location, or you want to build your own FFMPEG, or maybe you don't want to build the Game Engine, or the Blender Player, and so on.

In such a situation, you have to create a file called in the root directory of the Blender source.

All the configuration in this file will override the ones in your Scons config file (in our example,

If you don't know what to put in, please have a look at Scons default options to see their meaning.

In general, you have to copy some line from the default config file (in our example, and change the parameters that you want to override.

Building Blender

Note: since you intend to use Blender, you probably have a modern multi-core computer, so you should use the parallel build option to speed up the build. If you have a 2-core machine without hyperthreading, append -j 2 to the scons command. If you have a quad-core machine with hyperthreading, append -j 8 to the scons command.

cd ~/blender-git/blender
python scons/

At the end of the build process you will have a blender binary and a message...

Install file: "/home/myname/blender-git/blender/build/linux2/bin/blender" as
scons: done building targets.
*** Success ***

to run blender from the root path "~/blender-git/blender" you can create a symlink to the binary here... (the following example assumes you want the linux2 version)

cd ~/blender-git/blender
ln -s ../install/linux2/blender ./blender

Now you can run by typing (in ~/blender-git/blender)...


Rebuild after changing any files (in ~/blender-git/blender/ )...

 python scons/

If you have a multi-core CPU you can compile with multi-threading using the following:

 python scons/ -j 2

The number stands for the number of jobs, so if you have a quad-core CPU you could put "-j 4".

Scons options

For completeness, please check these scons options.