What could be the reason that you are getting the command not found error?

Refer to the exhibit

You are tasked with deploying FortiGate using Terraform. When you run the terraform version command during the Terraform installation, you get an error message.

What could be the reason that you are getting the command not found error?
A . You must move the binary file to the bin directory.
B . You must change the directory location to the root directory
C . You must assign correct permissions to the ec2-user.
D . You must reinstall Terraform

Answer: A

Explanation

According to the Terraform documentation for installing Terraform on Linux1, you need to download a zip archive that contains a single binary file called terraform. You need to unzip the archive and move the binary file to a directory that is included in your system’s PATH environment variable, such as /usr/local/bin. This way, you can run the terraform command from any directory without specifying the full path1.

If you do not move the binary file to the bin directory, you will get a command not found error when you try to run the terraform version command, as shown in the screenshot. To fix this error, you need to move the binary file to the bin directory or specify the full path of the binary file when running the command1.

1: Install Terraform | Terraform – HashiCorp Learn

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments