pkgos-scan-repo command not found

In this troubleshooting guide we learn how to fix pkgos-scan-repo command not found error message

Introduction

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

pkgos-scan-repo: command not found

or when using sudo you get the following error message

sudo: pkgos-scan-repo: command not found

Solutions to pkgos-scan-repo: command not found

How To Fix pkgos-scan-repo: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pkgos-scan-repo is provided by openstack-pkg-tools package.

openstack-pkg-tools is:

This package contains some useful shell scripts and helpers for building the OpenStack packages in Debian, including:

  • shared code for maintainer scripts (.config, .postinst, …).
  • init script templates to automatically generate init scripts for sysv-rc and systemd.
  • tools to build backports using sbuild and/or Jenkins based on gbp workflow.
  • utility to maintain git packaging (to be included in a debian/rules).

Even if this package is maintained in order to build OpenStack packages, it is of a general purpose, and it can be used for building any package.

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

sudo apt-get -y install openstack-pkg-tools

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

You can also use apt command to install openstack-pkg-tools.

sudo apt -y install openstack-pkg-tools

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

sudo aptitude install openstack-pkg-tools

Summary

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