How to install crcmod on Ubuntu Linux

For Google cloud Python work I need crcmod. How do I install crcmod on Ubuntu Linux 20.04 LTS cloud server?

CRCmod generates objects that compute the Cyclic Redundancy Check (CRC). It allows the use of any 8, 16, 24, 32, or 64 bit CRC. You can generate a Python function for the selected polynomial or an instance of the Crc class which provides the same interface as the md5 and sha modules from the Python standard library. A “Crc” class instance can also generate C/C++ source code that can be used in another application.

Step 1 - Search for package

apt search crcmod
apt-cache search crcmod
python3-crcmod - CRC Generator - Python 3.x

Step 2 - Install required tools

At least you need GCC compiler and Python set up/dev tools. Try:

sudo apt install gcc python3-dev python3-setuptools

Step 3 - Installing crcmod on Ubuntu Linux

Then run:

sudo pip3 uninstall crcmod
sudo pip3 install --no-cache-dir -U crcmod

Now you can use this module.

1 Like

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki