How To Install nvidia-cg-doc on Ubuntu 18.04

In this tutorial we learn how to install nvidia-cg-doc on Ubuntu 18.04. nvidia-cg-doc is Cg Toolkit - GPU Shader Authoring Language (documentation)

Introduction

In this tutorial we learn how to install nvidia-cg-doc on Ubuntu 18.04.

What is nvidia-cg-doc

nvidia-cg-doc is:

The Nvidia Cg Toolkit provides a compiler for the Cg language, runtime libraries for use with both leading graphics APIs, runtime libraries for CgFX, example applications, and extensive documentation. Supporting over 24 different OpenGL and DirectX profile targets, Cg will allow you to incorporate stunning interactive effects into your 3D applications.

The components include:

  • NVIDIA Cg Compiler
  • Unified Cg/CgFX Runtime
  • Cg User’s Manual
  • Cg Language Specification
  • Example programs and shaders

This package contains the developer documentation.

There are three methods to install nvidia-cg-doc on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install nvidia-cg-doc Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install nvidia-cg-doc using apt-get by running the following command:

sudo apt-get -y install nvidia-cg-doc

Install nvidia-cg-doc Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install nvidia-cg-doc using apt by running the following command:

sudo apt -y install nvidia-cg-doc

Install nvidia-cg-doc Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install nvidia-cg-doc using aptitude by running the following command:

sudo aptitude -y install nvidia-cg-doc

How To Uninstall nvidia-cg-doc on Ubuntu 18.04

To uninstall only the nvidia-cg-doc package we can use the following command:

sudo apt-get remove nvidia-cg-doc

Uninstall nvidia-cg-doc And Its Dependencies

To uninstall nvidia-cg-doc and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove nvidia-cg-doc

Remove nvidia-cg-doc Configurations and Data

To remove nvidia-cg-doc configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge nvidia-cg-doc

Remove nvidia-cg-doc configuration, data, and all of its dependencies

We can use the following command to remove nvidia-cg-doc configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge nvidia-cg-doc

References

Summary

In this tutorial we learn how to install nvidia-cg-doc package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.