Friday, 21 August 2020

How to upgrade Go on Ubuntu

I had oldish version (1.12.1) of Go on my Ubuntu 18.04 and I wanted to update it to the most recent one (1.15). 



This was my old version:

$ go version
go version go1.12.1 linux/amd64

It was using symlink pointing to my previous go installation which was in /var/lib/go:

$ which go /usr/local/bin/go $ ls -la /usr/local/bin/go lrwxrwxrwx 1 root root 18 Apr 1 2019 /usr/local/bin/go -> /var/lib/go/bin/go $ ls -la /var/lib/go/bin/go -rwxr-xr-x 1 root root 14609408 Mar 14 2019 /var/lib/go/bin/go $ ls -la /var/lib/go total 216 drwxr-xr-x 10 root root 4096 Mar 14 2019 . drwxr-xr-x 78 root root 4096 May 26 10:02 .. drwxr-xr-x 2 root root 4096 Mar 14 2019 api -rw-r--r-- 1 root root 55358 Mar 14 2019 AUTHORS drwxr-xr-x 2 root root 4096 Mar 14 2019 bin -rw-r--r-- 1 root root 1339 Mar 14 2019 CONTRIBUTING.md -rw-r--r-- 1 root root 78132 Mar 14 2019 CONTRIBUTORS drwxr-xr-x 8 root root 4096 Mar 14 2019 doc -rw-r--r-- 1 root root 5686 Mar 14 2019 favicon.ico drwxr-xr-x 3 root root 4096 Mar 14 2019 lib -rw-r--r-- 1 root root 1479 Mar 14 2019 LICENSE drwxr-xr-x 13 root root 4096 Mar 14 2019 misc -rw-r--r-- 1 root root 1303 Mar 14 2019 PATENTS drwxr-xr-x 6 root root 4096 Mar 14 2019 pkg -rw-r--r-- 1 root root 1607 Mar 14 2019 README.md -rw-r--r-- 1 root root 26 Mar 14 2019 robots.txt drwxr-xr-x 46 root root 4096 Mar 14 2019 src drwxr-xr-x 21 root root 12288 Mar 14 2019 test -rw-r--r-- 1 root root 8 Mar 14 2019 VERSION

I then removed the old installation:

$ sudo rm -rf /var/lib/go/

...and downloaded and unpacked the archive containing the latest version at recommended locaton (/usr/local):

$ sudo tar -C /usr/local -xzf go1.15.linux-amd64.tar.gz

$ ls -la /usr/local/go
total 236
drwxr-xr-x 10 root root  4096 Aug 11 20:16 .
drwxr-xr-x 12 root root  4096 Aug 21 13:14 ..
drwxr-xr-x  2 root root  4096 Aug 11 20:16 api
-rw-r--r--  1 root root 55669 Aug 11 20:16 AUTHORS
drwxr-xr-x  2 root root  4096 Aug 11 20:18 bin
-rw-r--r--  1 root root  1339 Aug 11 20:16 CONTRIBUTING.md
-rw-r--r--  1 root root 95475 Aug 11 20:16 CONTRIBUTORS
drwxr-xr-x  7 root root  4096 Aug 11 20:16 doc
-rw-r--r--  1 root root  5686 Aug 11 20:16 favicon.ico
drwxr-xr-x  3 root root  4096 Aug 11 20:16 lib
-rw-r--r--  1 root root  1479 Aug 11 20:16 LICENSE
drwxr-xr-x 12 root root  4096 Aug 11 20:16 misc
-rw-r--r--  1 root root  1303 Aug 11 20:16 PATENTS
drwxr-xr-x  6 root root  4096 Aug 11 20:19 pkg
-rw-r--r--  1 root root  1607 Aug 11 20:16 README.md
-rw-r--r--  1 root root    26 Aug 11 20:16 robots.txt
-rw-r--r--  1 root root   397 Aug 11 20:16 SECURITY.md
drwxr-xr-x 47 root root  4096 Aug 11 20:16 src
drwxr-xr-x 23 root root 12288 Aug 11 20:16 test
-rw-r--r--  1 root root     6 Aug 11 20:16 VERSION

$ cat /usr/local/go/VERSION 
go1.15

As expected, go binary was not available at the moment for the broken symlink:

$ go version
bash: /usr/local/bin/go: No such file or directory

$ ls -la /usr/local/bin/go
lrwxrwxrwx 1 root root 18 Apr  1  2019 /usr/local/bin/go -> /var/lib/go/bin/go // (symlink error)

I then deleted the old symlink and created a new one:

$ sudo rm /usr/local/bin/go 
$ sudo ln -s /usr/local/go/bin/go /usr/local/bin/go

After this my go symlink was pointing to the new version:

$ go version
go version go1.15 linux/amd64

$ which go
/usr/local/bin/go

$ ls -la /usr/local/bin/go
lrwxrwxrwx 1 root root 20 Aug 21 13:20 /usr/local/bin/go -> /usr/local/go/bin/go

$ ls -la /usr/local/go/bin/go
-rwxr-xr-x 1 root root 14256244 Aug 11 20:18 /usr/local/go/bin/go

$ /usr/local/go/bin/go version
go version go1.15 linux/amd64

3 comments:

Jason williams said...

Are you interested in any kinds of hacking services?
Feel free to contact TECHNECHHACKS.

For years now we’ve helped so many organizations and companies in hacking services.
TECHNECHHACKS is a team of certified hackers that has their own specialty and they are five star rated hackers.

We give out jobs to hackers (gurus only) to those willing to work, with or without a degree, to speed up the availability of time given to jobs!!

Thus an online binary decoding exam will be set for those who needs employment under the teams establishment.


we deal with the total functioning of sites like,


• SOCIAL MEDIA (Facebook, Twitter, Instagram, Snapchat, google hangout etc.)

• SCHOOL GRADES

• IOS/OS

• CREDIT SCORES

• BANK ACCOUNTS

• SPOUSES PHONE

Our special agents are five star rated agents that specializes in the following, and will specially be assigned to you for a special job well DONE.

• WESTERN UNION TRANSFER

• CREDIT CARDS INSTALLATION

• MONEY FLIPPING

• CRIMINAL RECORDS

• BTC RECOVERY

• BTC MINING

• BTC INVESTMENT

Thus bewere of scammers because most persons are been scammed and they ended up getting all solutions to their cyber bullies and attacks by US.

I am Jason williams one of the leading hack agent.

PURPOSE IS TO GET YOUR JOBS DONE AT EXACTLY NEEDED TIME REQUESTED!!!



And our WORK SUCCESS IS 100%!!!



We’re always available for you when you need help.

Contact or write us on:

Technechhacks@gmail.com

SIGNED....!

Jason. W

Technechhacks
2020©️All Right Reserved












Fixit said...

Hello all
am looking few years that some guys comes into the market
they called themselves hacker, carder or spammer they rip the
peoples with different ways and it’s a badly impact to real hacker
now situation is that peoples doesn’t believe that real hackers and carder scammer exists.
Anyone want to make deal with me any type am available but first
I‘ll show the proof that am real then make a deal like

Available Services

..Wire Bank Transfer all over the world

..Western Union Transfer all over the world

..Credit Cards (USA, UK, AUS, CAN, NZ)

..School Grade upgrade / remove Records

..Spamming Tool

..keyloggers / rats

..Social Media recovery

.. Teaching Hacking / spamming / carding (1/2 hours course)

discount for re-seller

Contact: 24/7

fixitrogers@gmail.com

irene said...

They are formidable group hackers comprise of Smart experienced and certified professional hackers,crackers and developers.
CONTACT AT=Theredhackergroup@gmail.com
WHATSAPP/TEXT: +1 571 318 9498
They are the best in all kinds of hacking job and they own powerful spare keys/software which enables them to break-in and hack anything hackable without any trace of disappointment and with full assurance and 100% success, vivid result within a few hours.
I was referred by someone, in which they help in upgrading my school grades, they are TESTED AND TRUSTED,
so now I am referring them to you too.
their numerous services include but not limited to the following:
*University / College Upgrades
* Offshore ATM Provide
* Database Hacking
* Mortgage Loan
* Fancy car loan
* Investment loan
* Gift card generator for bulk sale
* Delete criminal records
* Bitcoin hack and transfer
* Email and Paypal Hacking
* Work as Cybersecurity adviser
* Hijack corporate email
* Break into a cell phone
* MasterCard hacking
* Google Hacking
* Clearing credit
*iPhone Hacking Tricks
* Credit ATM card
* Hack Facebook Password Online
* Control devices remotely from your computer
* KEYLOGGER tricks constantly and gets Free Talktime from
your network provider
* Hacking Software with an untraceable IP address, etc.
*Bank account transfer etc -
>>>>>Contact them at= Theredhackergroup@gmail.com
WHATSAPP/TEXT = +1 571 318 9498
THEY ARE 100% RELIABLE, REFERABLE AND RETAINABLE