txtar-addmod command not found

In this troubleshooting guide we learn how to fix txtar-addmod command not found error message

Introduction

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

txtar-addmod: command not found

or when using sudo you get the following error message

sudo: txtar-addmod: command not found

Solutions to txtar-addmod: command not found

How To Fix txtar-addmod: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu txtar-addmod is provided by go-internal package.

go-internal is:

The go-internal repository factors out an opinionated selection of internal packages and functionality from the Go standard library. Currently this consists mostly of packages and testing code from within the Go tool implementation.

Included are the following:

  • dirhash: calculate hashes over directory trees the same way that the Go tool does.
  • goproxytest: a GOPROXY implementation designed for test use.
  • gotooltest: Use the Go tool inside test scripts (see testscript below).
  • imports: list of known architectures and OSs, and support for reading import statements.
  • modfile: read and write go.mod files while preserving formatting and comments.
  • module: module paths and versions.
  • par: do work in parallel.
  • semver: semantic version parsing.
  • testenv: information on the current testing environment.
  • testscript: script-based testing based on txtar files.
  • txtar: simple text-based file archives for testing.

This package contains the compiled binaries, namely testscript, txtar-addmod, txtar-c and txtar-goproxy.

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

sudo apt-get -y install go-internal

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

You can also use apt command to install go-internal.

sudo apt -y install go-internal

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

sudo aptitude install go-internal

Summary

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