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. 记前些日子archlinux更新后无法调节声音的解决方法

    桌面环境用的是xfce4. 自从某次更新过后,panel中调节声音的插件变成了 xfce4-pulseaudio-plugin.然后就发现在panel中无法调节声音了. 在这个插件的属性中发现了一项设 ...

  2. mysql优化(四)

    一.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where / group by / order by 涉及的列上建立索引. 1.索引失效情况. SQL什么条件会使用索引? 当字段上建有索引时, ...

  3. RabbitMQ的使用场景

    RabbitMQ的使用场景   1 大数据日志收集消息中间件应用场景     2 消息中间件在搜索系统DIH(伪实时)中的应用       伪实时的搜索系统:   后台系统:(作为生产者发送消息)   ...

  4. HTTP GET的VC三种方式

    一.第一种方式(包装类的方式) a.在VC++添加类,选择typelib b.选择文件:C:\Windows\System32\winhttp.dll 选择到右边生成的类,最后点完成,即产生了一个CW ...

  5. 找不到System.Web.Optimization命名空间

    找不到System.Web.Optimization命名空间,无法完成BundleConfig.cs内容的添加. 解决方法如下:打开程序包管理控制台,在控制台中输入:Install-PackageMi ...

  6. Yii2将查询数据变为键值对数组及查询构建器

  7. jsp登陆界面代码

    <%@ page language="java" contentType="text/html; charset=UTF-8"     pageEncod ...

  8. jsp无法访问

    一直无法访问jsp: 由于Spring boot使用的内嵌的tomcat,而内嵌的tamcat是不支持jsp页面的,所有需要导入额外的包才能解决. <!-- 解决jsp无法访问 --> & ...

  9. django2.0 路由规则

    Django2.0中URL的路由机制 路由是关联url及其处理函数关系的过程.Django的url路由配置在settings.py文件中ROOT_URLCONF变量指定全局路由文件名称. Django ...

  10. django models数据库操作

    一.数据库操作 1.创建model表         基本结构 1 2 3 4 5 6 from django.db import models     class userinfo(models.M ...