primusrun command not found

In this troubleshooting guide we learn how to fix primusrun command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

primusrun: command not found

or when using sudo you get the following error message

sudo: primusrun: command not found

Solutions to primusrun: command not found

How To Fix primusrun: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu primusrun is provided by primus package.

primus is:

Primus is a shared library that provides OpenGL and GLX APIs and implements low-overhead local-only client-side OpenGL offloading via GLX forking, similar to VirtualGL. It intercepts GLX calls and redirects GL rendering to a secondary X display, presumably driven by a faster GPU. On swapping buffers, rendered contents are read back using a PBO and copied onto the drawable it was supposed to be rendered on in the first place.

Primus is currently intended to be used alongside Bumblebee and provides a drop-in replacement for optirun (i.e. “primusrun”).

To fix this problem, we can install more using the command below.

sudo apt-get -y install primus

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install primus.

sudo apt -y install primus

Or if you have aptitude installed you can use the following command.

sudo aptitude install primus

Summary

In this tutorial we learn how to fix primusrun command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.