Skip to content

Commit 293a11f

Browse files
authored
Create 02-02-2024-Package-is-not-in-GOROOT.md
1 parent 3dc0d42 commit 293a11f

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
layout: post
3+
title: "Golang install issue fixing: Package is not in GOROOT"
4+
description: "How to fix the error package is not in GOROOT?"
5+
date: 2024-02-02
6+
tags: [article, issue, fix, golang]
7+
comments: false
8+
share: true
9+
---
10+
# Resolving $GOROOT Issue: Save Time with Quick Fixes
11+
12+
Time is precious, so let's get straight to the point.
13+
14+
## The Problem
15+
Recently, while attempting to install a package using Go, I encountered an unusual error:
16+
17+
```bash
18+
package crypto/ecdh is not in GOROOT
19+
```
20+
21+
Before running these commands, I would invite you to understand them and not trust blindly an internet article. However, if you're looking for the solution and knows about the commands listed below, just continue reading.
22+
23+
To swiftly resolve this issue, follow these simple steps:
24+
25+
Remove Existing Go binaries
26+
```bash
27+
sudo rm -rf /bin/go
28+
```
29+
30+
31+
Update the package list and address any missing dependencies:
32+
```bash
33+
sudo apt update --fix-missing
34+
```
35+
36+
Reinstall Golang with all the binaries
37+
```bash
38+
sudo apt install golang -y
39+
```
40+
41+
By executing these commands, you should be able to overcome the $GOROOT issue and continue with your Go package installation seamlessly.
42+
43+
Remember, efficiency matters – let's make the most of our time!

0 commit comments

Comments
 (0)