centos7 原始碼編譯安裝 go 和 lantern

來源:互聯網
上載者:User



###########################################################
cd /home/wy/mySoftware/go-go1.4
./all.bash

vi /etc/profile

GOPATH=/home/wy/mySoftware/go-go1.4
GOROOT=/home/wy/mySoftware/go-go1.4
PATH=$PATH:$GOROOT/bin
GOROOT_BOOTSTRAP=/home/wy/mySoftware/go-go1.4

source /etc/profile

go version



###########################################################
cd /home/wy/mySoftware/go-lantern/src

./all.bash

報錯
ERROR: Cannot find /home/wy/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
解決辦法:
cp -r /home/wy/mySoftware/go-go1.4  /home/wy/go1.4


vi /etc/profile

GOPATH=/home/wy/mySoftware/go-lantern
GOROOT=/home/wy/mySoftware/go-lantern
PATH=$PATH:$GOROOT/bin
GOROOT_BOOTSTRAP=/home/wy/mySoftware/go-lantern

source /etc/profile
###########################################################

cd /home/wy/mySoftware
git clone https://github.com/getlantern/lantern.git
cd lantern
make lantern

出現報錯:
Missing "node" command.
make: *** [src/github.com/getlantern/flashlight/ui/resources.go] Error 1
解決辦法:
參考nodejs官網  https://nodejs.org/en/download/package-manager/

curl --silent --location https://rpm.nodesource.com/setup_9.x | sudo bash -
yum -y install nodejs

出現報錯:
Missing "gulp" command. Try "npm install -g gulp-cli"
make: *** [src/github.com/getlantern/flashlight/ui/resources.go] Error 1
解決辦法:
npm install -g gulp-cli


出現報錯:
Building development lantern
** VERSION was not set, using default version. This is OK while in development.
Build tags:
Extra ldflags:
# pkg-config --cflags gtk+-3.0 appindicator3-0.1
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package appindicator3-0.1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `appindicator3-0.1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'appindicator3-0.1' found
pkg-config: exit status 1
make: *** [lantern] Error 2
解決辦法:
yum install libappindicator-gtk3-devel.x86_64



make lantern
./lantern





github 上下載 go1.4版本,和go的 lantern 分支,不然會報很多錯

lantern下載用命令  git clone https://github.com/getlantern/lantern.git















相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.