tpm_extendpcr command not found

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

Introduction

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

tpm_extendpcr: command not found

or when using sudo you get the following error message

sudo: tpm_extendpcr: command not found

Solutions to tpm_extendpcr: command not found

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

In Ubuntu tpm_extendpcr is provided by libstrongswan-extra-plugins package.

libstrongswan-extra-plugins is:

The strongSwan VPN suite uses the native IPsec stack in the standard Linux kernel. It supports both the IKEv1 and IKEv2 protocols.

This package provides extra plugins for the strongSwan utility and cryptographic library.

Included plugins are:

  • af-alg [linux] (AF_ALG Linux crypto API interface, provides ciphers/hashers/hmac/xcbc)
  • ccm (CCM cipher mode wrapper)
  • cmac (CMAC cipher mode wrapper)
  • ctr (CTR cipher mode wrapper)
  • curl (libcurl based HTTP/FTP fetcher)
  • curve25519 (support for Diffie-Hellman group 31 using Curve25519 and support for the Ed25519 digital signature algorithm for IKEv2)
  • gcrypt (Crypto backend based on libgcrypt, provides RSA/DH/ciphers/hashers/rng)
  • ldap (LDAP fetching plugin based on libldap)
  • ntru (key exchanged based on post-quantum computer NTRU)
  • padlock (VIA padlock crypto backend, provides AES128/SHA1)
  • pkcs11 (PKCS#11 smartcard backend)
  • rdrand (High quality / high performance random source using the Intel rdrand instruction found on Ivy Bridge processors)
  • test-vectors (Set of test vectors for various algorithms)

Also included is the libtpmtss library adding support for TPM plugin (https://wiki.strongswan.org/projects/strongswan/wiki/TpmPlugin)

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

sudo apt-get -y install libstrongswan-extra-plugins

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

You can also use apt command to install libstrongswan-extra-plugins.

sudo apt -y install libstrongswan-extra-plugins

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

sudo aptitude install libstrongswan-extra-plugins

Summary

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