Template:Building Blender/Linux/intro



Quick Setup

The following instructions will create a Blender build in a blender-git folder in your home directory.

Install Initial Packages

Ensure both Python3 and Git are installed.

Download Sources

Download the latest source code from projects.blender.org.

mkdir ~/blender-git
cd ~/blender-git
git clone https://projects.blender.org/blender/blender.git

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

Install Basic Building Environment

You need to install all the basic dependencies manually, using packages specific to your Linux distribution:

gcc g++ make cmake
git subversion
libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev
libwayland-dev wayland-protocols libxkbcommon-dev libdbus-1-dev linux-libc-dev

Running this command will also give you the list of required dependencies.

cd ~/blender-git/blender/
./build_files/build_environment/install_linux_packages.py

Download Libraries

For Intel and AMD Linux systems, we recommend using precompiled libraries. These are the quickest way to get a feature complete Blender build and can be downloaded as follows.

These libraries are built on Rocky8 for VFX reference platform compatibility, but they work fine on other Linux distributions.

mkdir ~/blender-git/lib
cd ~/blender-git/lib
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_x86_64_glibc_228

To use system packages, see Advanced Setup.

Update and Build

Get latest source code and add-ons, and build. These commands can be used for the first build, and repeated whenever you want to update to the latest version.

cd ~/blender-git/blender
make update
make

After the build finished, you will find blender ready to run in ~/blender-git/build_linux/bin.

If building fails after an update, it sometimes helps to remove the ~/blender-git/build_linux folder to get a completely clean build.

Branches

With the quick setup instructions the main branch will be built by default, which contains the latest Blender version under development.

To build another branch or a pull request, first checkout the branch and then run make update to update the add-ons, libraries and tests to match.

cd ~/blender-git/blender
git checkout <branch-name>
make update
make

Depending on how big the changes are compared to the main branch, it may be necessary to remove the build folder ~/blender-git/build_linux. Otherwise the build folder may still refer to libraries from another branch.