All Projects → tgogos → rpi_golang

tgogos / rpi_golang

Licence: other
How to install Go (golang) on Raspberry Pi 3

Projects that are alternatives of or similar to rpi golang

yamete
Yamete - Hentai downloader in PHP CLI - Easy site downloader PHP system
Stars: ✭ 63 (+186.36%)
Mutual labels:  raspberry-pi-3
bluetooth-iot-service-python
This application connects two devices over Bluetooth and allows one to send messages to the other using json. Raspberry Pi Bluetooth interfacing with Linux via RFCOMM BT network
Stars: ✭ 23 (+4.55%)
Mutual labels:  raspberry-pi-3
BeerBot
A never-ending supply of cold beer at KI labs to maintain employee happiness
Stars: ✭ 30 (+36.36%)
Mutual labels:  raspberry-pi-3
wor-flasher
Legal utility that runs on RPiOS to flash another SD card with Windows 10/11
Stars: ✭ 451 (+1950%)
Mutual labels:  raspberry-pi-3
azure-iot-starter-kits
Samples for Azure IoT starter kits.
Stars: ✭ 29 (+31.82%)
Mutual labels:  raspberry-pi-3
Face-Recognition-using-Raspberry-Pi
A small project which does face detection using OpenCV library.
Stars: ✭ 48 (+118.18%)
Mutual labels:  raspberry-pi-3
Home-AssistantConfig
Home Assistant configuration and documentation using Hass.io on rpi3
Stars: ✭ 12 (-45.45%)
Mutual labels:  raspberry-pi-3
aprenda-python
Aprendizado, dicas e projetos sobre Python
Stars: ✭ 22 (+0%)
Mutual labels:  raspberry-pi-3
RPi-TELEBOT
Python based Telegram bot to monitor and control the raspberry pi
Stars: ✭ 19 (-13.64%)
Mutual labels:  raspberry-pi-3
Linux-System-Info-Webpage
Material Design Dashboard for Linux System Info. Great for RPi and other linux Distros
Stars: ✭ 19 (-13.64%)
Mutual labels:  raspberry-pi-3
smart-home
Control house using raspberry pi djago based secure REST api. Made using raspberry pi, arduino, django ,django REST and angular.
Stars: ✭ 30 (+36.36%)
Mutual labels:  raspberry-pi-3
SmartMirror
Raspberrry Pi powered smart mirror inspired by HackerHouseYT Smart Mirror project
Stars: ✭ 16 (-27.27%)
Mutual labels:  raspberry-pi-3
EEGwithRaspberryPI
Open-Source board for converting RaspberryPI to Brain-computer interface
Stars: ✭ 402 (+1727.27%)
Mutual labels:  raspberry-pi-3
Three-Factor-Security-Door
What do you get when you mix a Raspberry Pi, a MySQL database, an RFID reader, an LCD touchscreen, a relay switch, an electronic door strike and a Twilio SMS account?
Stars: ✭ 49 (+122.73%)
Mutual labels:  raspberry-pi-3
webcam-to-cctv-using-rpi
In this project, we will use a webcam with Raspberry Pi to live stream wirelessly.
Stars: ✭ 17 (-22.73%)
Mutual labels:  raspberry-pi-3
Pi-Trader
A cryptocurrency day-trading bot for Raspberry Pi.
Stars: ✭ 44 (+100%)
Mutual labels:  raspberry-pi-3
WOA-Deployer
WOA Deployer
Stars: ✭ 77 (+250%)
Mutual labels:  raspberry-pi-3
motor-hat
Node Module to control Adafruits MotorHAT for the RaspberryPi
Stars: ✭ 28 (+27.27%)
Mutual labels:  raspberry-pi-3
MMM-OpenmapWeather
This module loads current weather as images on Magic Mirror
Stars: ✭ 18 (-18.18%)
Mutual labels:  raspberry-pi-3
MyIoT
[MyIoT] A start with personal server for home automation
Stars: ✭ 14 (-36.36%)
Mutual labels:  raspberry-pi-3

How to install Go on Raspberry Pi 3

Test environment

#1 Without Go Version Manager (gvm)

Start with go1.4.3

The general idea is that you first download the source and then compile it. But, for your convenience and to bypass this procedure, this git repository has already a binary tar, named go1.4.3.linux-armv7.tar.gz.

rm -rf /usr/local/go
git clone https://github.com/tgogos/rpi_golang.git # (current repository)
cd rpi_golang/
tar -xzf go1.4.3.linux-armv7.tar.gz -C /usr/local
export PATH=/usr/local/go/bin:$PATH
echo "export PATH=/usr/local/go/bin:$PATH" >> /root/.bashrc
go version #test it works

Continue with a newer version (optional)

rm -fr $HOME/go1.4
mkdir -p $HOME/go1.4
tar -xzf go1.4.3.linux-armv7.tar.gz -C $HOME/go1.4 --strip-components=1

rm -fr /usr/local/go
wget https://dl.google.com/go/go1.10.3.src.tar.gz
tar -xz -C /usr/local -f go1.10.3.src.tar.gz

cd /usr/local/go/src
time GOROOT_BOOTSTRAP=/root/go1.4 ./make.bash  # See sample output below
go version  # test that the new version is printed out

Output of ./make.bash

root@rpi:/usr/local/go/src# time GOROOT_BOOTSTRAP=/root/go1.4 ./make.bash
Building Go cmd/dist using /root/go1.4.
Building Go toolchain1 using /root/go1.4.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.


Building packages and commands for linux/arm.
---
Installed Go for linux/arm in /usr/local/go
Installed commands in /usr/local/go/bin

real    8m42.421s
user    18m36.579s
sys     0m44.624s



root@rpi:/usr/local/go/src# go version
go version go1.10.3 linux/arm

go1.4.3.linux-armv7.tar.gz - how it was created

The following information comes from this source: http://blog.hypriot.com/post/how-to-compile-go-on-arm/

Step-1 Downloaded and compiled the source code

wget https://storage.googleapis.com/golang/go1.4.3.src.tar.gz
rm -rf /usr/local/go
tar -xz -C /usr/local -f go1.4.3.src.tar.gz
cd /usr/local/go/src
time ./make.bash

Step-2 Created the binary tar for further use

tar -czf ~/go1.4.3.linux-armv7.tar.gz -C /usr/local go
tar --numeric-owner -czf ~/go1.4.3.linux-armv7.tar.gz -C /usr/local go

#2 With Go Version Manager (gvm)

https://github.com/moovweb/gvm

sudo apt-get install curl git make binutils bison gcc build-essential
# install gvm
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /home/pi/.gvm/scripts/gvm

# install go
gvm install go1.4 
gvm use go1.4 
export GOROOT_BOOTSTRAP=$GOROOT 
gvm install go1.7
gvm use go1.7 --default

Configuration of $PATH, $GOPATH variables

From the "Getting Started" page of golang.org:

Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin

Most of the times that I have used a combination of Go and Beego framework, I add the following lines:

export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go

# and for the `bee` tool:
export PATH=$PATH:$GOPATH/bin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].