google-wire command not found

In this troubleshooting guide we learn how to fix google-wire command not found error message

Introduction

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

google-wire: command not found

or when using sudo you get the following error message

sudo: google-wire: command not found

Solutions to google-wire: command not found

How To Fix google-wire: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu google-wire is provided by google-wire package.

google-wire is:

Wire: Automated Initialization in Go

Wire is a code generation tool that automates connecting components using dependency injection. Dependencies between components are represented in Wire as function parameters, encouraging explicit initialization instead of global variables. Because Wire operates without runtime state or reflection, code written to be used with Wire is useful even for hand-written initialization.

For an overview, see the introductory blog post https://blog.golang.org/wire

This package contains the wire command-line program.

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

sudo apt-get -y install google-wire

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

You can also use apt command to install google-wire.

sudo apt -y install google-wire

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

sudo aptitude install google-wire

Summary

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