github上的安装指导:

  • Custom fork of Go is currently required. We'll eventually switch to Go 1.7 which supports what we need due to this.
  • An OSX or Linux host. Building on Windows is only partially supported with the help of Cygwin.
  • Git - brew install gitapt-get install git, etc
  • GNU Make
  • Nodejs & NPM
  • GNU C Library (linux only) - apt-get install libc6-dev-i386, etc
  • Gulp - npm i gulp-cli -g

To build and run Lantern desktop, just do:

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

During development, you'll likely want to do a clean build like this:

make clean-desktop lantern && ./lantern

按照此方法开始安装
1.安装go
这里需要编译lantern的go语言源代码,否则出现变量为定义。此问题是由于 Lantern 是用golang写的,但是不知道为啥,自己fork了一份golang。所以如果用官方的go编译会编译不通过。因为有个变量(tr.MaxIdleTime undefined)在官方的go标准库里面没有。
 
从github上lantern克隆下来go的源代码编译 git clone https://github.com/golang/go 
 
cd到go 执行编译 ./all.bash
 
Error:Cannot find /root/go1.4/bin/go.
解决办法连接:https://blog.csdn.net/zhang197093/article/details/78468918
 https://github.com/northbright/Notes/blob/master/Golang/china/install-go1.6-from-source-on-centos7-in-china.md
https://blog.csdn.net/qq_15437667/article/details/59776840
上面的连接下载的go1.9.2.linux-amd64.tar.gz,然后使用这个编译lantern在github上fork的go。
 

在 /etc/profile 文件中添加以下几行

export GOROOT=/你的go1.4的目录
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN

export GOROOT_BOOTSTRAP=/你的go1.4的目录

使用export命令查看环境变量。

[root@localhost src]# source /etc/profile

[root@localhost src]# env | grep GO
GOBIN=/root/software/go-go1.9.2/bin
GOROOT=/root/software/go-go1.9.2
[root@localhost src]# echo $PATH
/usr/local/luajit/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/software/go-go1.9.2/bin
[root@localhost src]# go version
go version go1.9.2 linux/amd64

 
 安装完成go1.4,并配置完环境变量,cd到lantern版本的go下面编译。
然后配置为新编译的环境变量下。

export GOROOT=/你的go-lantern的目录
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN

export GOROOT_BOOTSTRAP=/你的go-lantern的目录

解决完上面问题再去编译一把,缺少的一些libqt的库直接网上搜索,在qt网站上会有安装命令。最后再编译下:

出现错误
import cycle not allowed
package github.com/getlantern/flashlight/main
imports flag
imports errors
imports runtime
imports runtime/internal/atomic
imports runtime
make: *** [lantern] Error 1

 网上搜索到这是互相依赖造成的,看样子是因为代码的相互依赖造成的。只有等开发者修复了。
折腾到此结束。看来想用lantern还是用ubuntu吧,毕竟直接提供deb包

centos 编译lantrn的更多相关文章

  1. CentOS编译安装NodeJS+Express

    NodeJS是基于Chrome’s Javascript runtime,也就是Google V8引擎执行Javascript的快速构建网络服务及应用的平台,其优点有: 在CentOS编译安装Node ...

  2. Centos编译安装PHP 5.5笔记

    本篇是在 Centos 6.4 32bit 下编译安装 php 5.5.5 的笔记,接上篇 Centos编译安装Apache 2.4.6笔记.php 5.5.x 和 centos 源里面的 php 5 ...

  3. CentOS 编译 GCC 7.2

    CentOS 编译 GCC 7.2 下载源码 wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-7.2.0/gcc-7.2.0. ...

  4. nginx php-fpm安装配置 CentOS编译安装php7.2

    CentOS编译安装php7.2 介绍: 久闻php7的速度以及性能那可是比php5系列的任何一版本都要快,具体性能有多好,建议还是先尝试下再说.如果你是升级或新安装,那你首先需要考虑php7和程序是 ...

  5. CentOS编译安装nodejs

    1. 从node.js官网下载最新版的node.js安装包,node.tar.gz wget https://nodejs.org/dist/v4.3.1/node-v4.3.1.tar.gz    ...

  6. CentOS 编译安装 mysql

    1.前期准备 1.1 环境说明: 操作系统: CentOS release 6.4 (Final) [查看命令 cat /etc/redhat-release ] mysql : mysql-5.6. ...

  7. CentOS编译安装lamp

    LAMP环境搭建(编译安装CentOS+httpd2.2+mysql5.5+php5.4) 首先准备以下压缩包 <ignore_js_op> (1)编译安装apache 1.配置防火墙,开 ...

  8. CentOS编译安装Python3

    前话 最近想学一下一门新的高级语言,无意中看到用python仿AIphaGo的github项目,就决定是他了. AIphaGo的Git传送门: https://github.com/Rochester ...

  9. centos编译helloworld的几个小问题

    1.GCC使用在使用GCC编译程序时,编译过程可以被细分为四个阶段:预处理(Pre-Processing)编译(Compiling)汇编(Assembling)链接(Linking).例如:      ...

随机推荐

  1. JavaScript 深入了解对象中的属性

    本篇主要介绍JS中对象的属性,包括:属性的分类.访问方式.检测属性.遍历属性以及属性特性等内容. 目录 1. 介绍:描述属性的命名方式.查找路径以及分类 2. 属性的访问方式:介绍'.'访问方式.'[ ...

  2. c# 在mongo中查询经纬度范围

    #region 索引 //IndexKeysDocument doc = new IndexKeysDocument();//新建索引 //2d 平面坐标索引,适用于基于平面的坐标计算.也支持球面距离 ...

  3. shell文件的编写

    见文章http://www.cnblogs.com/handsomecui/p/5869361.html

  4. sqlserver 用一个表的值 更新另一个表

    update cas set cas.DocumentHeaderIdOfTransferredForForm = apply.Id from dbo.CaseTransfer cas join db ...

  5. 学习笔记<2>Android基本四大组件

    <1>Activity(活动) ------与用户交互的界面 (1)Activity启动基本流程 <2>service(服务) <3>ContentProvider ...

  6. 擠出線寬(Extrusion width),要怎麼設定?

    擠出線寬(Extrusion width),要怎麼設定? Slic3r的作者,把這邊的%設定,跟"層高"做連結.我個人認為擠出線寬,要以噴頭孔徑當做設定參考才好.層高應該只要設定成 ...

  7. Sitecore详细安装(包含sitecore安装过程截图)

    一.到Sitecore 官网下载安装包 1)浏览器中输入https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx 2)安 ...

  8. javascript判断对象是否为domElement

    我们在写js代码时有时需要判断某个对象是不是DOM对象,然后再进行后续的操作,这里我给出一种兼容各大浏览器,同时又算是比较稳妥的一种方法. 要判断一个对象是否DOM对象,首先想到的无非就是它是否具有D ...

  9. html5水平方向重力感应

    html5图片随手机重力感应而移动 <!DOCTYPE html> <html lang="zh-cn"><head><meta http ...

  10. 新建git并将本地代码上传到分支

    1 查看远程分支 $ git branch -a * br-2.1.2.2 master remotes/origin/HEAD -> origin/master remotes/origin/ ...