6

I'm new to blender, was trying to render my project, and ran into a bug that appears to be a problem with the blender installed by sudo apt install blender.

Fortunately, the blender website has a more recent version that doesn't have the bug, version 2.92.0. I downloaded the blender-2.92.0-linux64.tar.xz file from their website and extracted it in my home directory and you can run it right from that location. I would like to remove the Blender 2.82 (sub 7) installed by apt and make my system refer to the blender i've downloaded myself such that command line uses the new version. Right now this refers to the old version:

$ blender -v
Blender 2.82 (sub 7)

So my questions are:

  1. to remove the old blender (and any vestige of its files), is it sufficient to just sudo apt remove blender?
  2. where in my file system should I put the contents of blender-2.92.0-linux64.tar.xz? Is there a standard location for software that you install yourself?
  3. Are there any environment variables I need to set? Should I set these in .profile? .bashrc? Or somewhere else?
  4. Do I need to create any kind of symbolic link in /usr/bin directory or something like that to point to the new version of blender?

EDIT: some additional information.

Extracting the tar file yields these contents:

$ ls -l blender-2.92.0-linux64
total 238960
drwxrwxr-x 5 jaith jaith      4096 Apr 14 19:56 2.92
-rwxr-xr-x 1 jaith jaith 244635248 Feb 25 01:33 blender
-rw-r--r-- 1 jaith jaith      5589 Jan 13 08:40 blender.desktop
-rwxr-xr-x 1 jaith jaith       713 Jan 13 08:40 blender-softwaregl
-rw-r--r-- 1 jaith jaith      1732 Jan 13 08:40 blender.svg
-rw-r--r-- 1 jaith jaith      3874 Jan 13 08:40 blender-symbolic.svg
-rwxr-xr-x 1 jaith jaith      5340 Jan 13 08:40 blender-thumbnailer.py
-rw-r--r-- 1 jaith jaith      4765 Jan 13 08:40 copyright.txt
drwxrwxr-x 2 jaith jaith      4096 Apr 14 19:56 lib
drwxrwxr-x 2 jaith jaith      4096 Apr 14 19:56 license
-rw-r--r-- 1 jaith jaith      5200 Feb 25 01:31 readme.html

There's the blender executable, the blender.desktop file, with these two entries of special interest because they have no path whatsoever:

Exec=blender %f
Icon=blender

I believe a proper installation should not require any changes to PATH so I think the answer to my question #3 should probably be NO. Path on my machine is currently:

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

which does not include /use/share/applications (or /usr/share/applications).

EDIT 2: I would add that the information in the readme.html file that comes with Blender is especially unhelpful:

INSTALLATION Linux: Unpack the archive, then run the Blender executable.

The linux install instructions on the Blender site also look rather unorthodox and incomplete as well.

4
  • There must be a binary executable file in it. The desktop file must have the full path of that. You can place it under /use/share/applications for all users to access. But I suggest you to go with the PPA instead. It would give you automatic updates, but is not a large download like snap/flatpak. And it would take care of placing files properly. Apr 15, 2021 at 2:35
  • Can you run ls on the extracted directory and post the output? (it gives list of all files). I cannot tell you the exact filename without examining what all files are there. Apr 15, 2021 at 2:38
  • @ArchismanPanigrahi I have added the list of files as well as some other detail.
    – S. Imp
    Apr 15, 2021 at 3:06
  • I have edited my answer to include the details. However, you can use the other installation methods (ppa/snap/flatpak/appimage), they are much more simpler. Apr 15, 2021 at 4:21

1 Answer 1

8

Short answer - If you are confused by so many options, simply add the PPA (described below) with the following commands, and everything will be automatically taken care of.

sudo add-apt-repository ppa:savoury1/blender
sudo apt update
sudo apt install blender

Long answer



To remove apt version of blender


Use the command

sudo apt purge blender

to remove blender and all its configuration files. Then, you can also run

sudo apt autoremove

to remove the unused dependencies of blender (and also of other apps).

To install the latest version of blender


  • Extract the .tar.gz file in your home folder. Rename the new directory to blender. Edit the Exec entry of blender.desktop to Exec=/home/your-username/blender/blender %f, and the Icon entry to Icon=/home/your-username/blender/blender.svg.

Then place the .desktop file in .local/share/applications in your home folder, so that it can be searched in the menu. Alternatively, you can also place it in /usr/share/applications (you will need to have sudo access to do that), if you want all users to access it.

To call blender from command line, you can either copy the blender binary file in the extracted folder, or create a symbolic link to it, at /usr/local/bin/blender.

To create a symbolic link, run the command sudo ln -s /home/your-username/blender/blender /usr/local/bin/blender

You can also place the extracted folder to any other location of your choice. Then you would have to edit the .desktop file accordingly.

  • If you prefer traditional package, you can use the unofficial Blender PPA instead.
sudo add-apt-repository ppa:savoury1/blender
sudo apt update
sudo apt install blender
  • You can also use the Appimage instead. Download (it is a single file) and double click to run.

  • You can also use the snap or flatpak versions

sudo snap install blender

or

flatpak install flathub org.blender.Blender
  • There is no need to set any environment variable or symbolic links. If you use the blender-x.tar.gz, you can simply create a .desktop file and save it in .local/share/applications. If you use the PPA, appimage, or snap or flatpak, that would be taken care of automatically.
6
  • this is a helpful answer. Where should I put the contents of the downloaded blender.tar.xz file? It's currently just in a temporary location.
    – S. Imp
    Apr 14, 2021 at 20:53
  • your answer is helpful, but incomplete. The blender.tar.xz has quite a few files in it, and should probably live in a blender folder somewhere (/opt? /usr/local/share? /usr/local/lib?). This blender tar archive also already contains a blender.desktop file but that file simple assigns no path in the Exec section, with only Exec=blender %f. Sounds like we will need to either edit the PATH or put a symbolic link in one of the directories already in the path like /usr/local/bin. Also, if I'm not mistaken, .local would be only for a single user. I'd like it to be for all.
    – S. Imp
    Apr 15, 2021 at 0:46
  • In large part where to put binaries is up to you. It doesn't matter which folder, other users can use it if they have permissions. I'd do which blender before purging (which will remove config files!), then put the new blender binary in the old location. Yes .desktop files may need modifying and placing; this is why people stick with packages.
    – pbhj
    Apr 15, 2021 at 8:00
  • "... or create a symbolic link to it, at /usr/bin/blender." - Please use /usr/local/bin/ for that. /usr/bin/ is under control of the package manager, the /usr/local/ is intended for locally-installed software. This provides a cleaner separation between apt-managed software and manually installed software, easing among other things cleanup later.
    – marcelm
    Apr 15, 2021 at 8:50
  • 1
    @marcelm Done. Thanks. Apr 15, 2021 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.