pam_getenv command not found

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

Introduction

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

pam_getenv: command not found

or when using sudo you get the following error message

sudo: pam_getenv: command not found

Solutions to pam_getenv: command not found

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

In Ubuntu pam_getenv is provided by libpam-runtime package.

libpam-runtime is:

Contains configuration files and directories required for authentication to work on Debian systems. This package is required on almost all installations.

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

sudo apt-get -y install libpam-runtime

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

You can also use apt command to install libpam-runtime.

sudo apt -y install libpam-runtime

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

sudo aptitude install libpam-runtime

Summary

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