getaddrinfo command not found

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

Introduction

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

getaddrinfo: command not found

or when using sudo you get the following error message

sudo: getaddrinfo: command not found

Solutions to getaddrinfo: command not found

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

In Ubuntu getaddrinfo is provided by libruli-bin package.

libruli-bin is:

RULI stands for Resolver User Layer Interface. It’s a library built on top of an asynchronous DNS stub resolver. RULI provides an easy-to-use interface for querying DNS SRV resource records. The goal is to promote the wide deployment of SRV-cognizant client programs. RULI aims to fully support SRV-related standards.

This package contains the RULI sample programs.

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

sudo apt-get -y install libruli-bin

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

You can also use apt command to install libruli-bin.

sudo apt -y install libruli-bin

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

sudo aptitude install libruli-bin

Summary

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