go开发工具安装使用—Liteide-centos6.8

 开发工具介绍

  • LiteIDE

    https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/zh_CN/readme.md

    http://www.infoq.com/cn/articles/use-liteIDE-develop-go

    https://www.kafan.cn/edu/5192096.html

  • sublime 3 强大的代码编辑工具

    packagename.xxxx  仅可以跳转带包名的

    http://blog.csdn.net/kenkao/article/details/49488833vim 配置

    http://studygolang.com/articles/4903

  • shud参考链接

    http://dockone.io/article/709

下面介绍Liteide安装使用

1. QT检查与安装

1.1 检查当前QT版本

  rpm -qa|grep qt
  liteide需要qt4.0以上版本
  如果不是,需要卸载 重装

  卸载

yum remove qt
rpm -qa|grep qt
rpm -e qt3-PostgreSQL-3.3.8b-30.el6.x86_64 --nodeps
rpm -e qt3-MySQL-3.3.8b-30.el6.x86_64 --nodeps
rpm -e qt3-devel-docs-3.3.8b-30.el6.x86_64 --nodeps
rpm -e qt3-ODBC-3.3.8b-30.el6.x86_64 --nodeps
rpm -e qt3-sqlite-3.3.8b-30.el6.x86_64 --nodeps
rpm -e qt3-config-3.3.8b-30.el6.x86_64 --nodeps
rpm -e qt3-designer-3.3.8b-30.el6.x86_64 --nodeps

1.2 下载安装QT

  下载安装qt5.8(http://download.qt.io/official_releases/qt/5.8/5.8.0/ 下的 qt-opensource-linux-x64-5.8.0.run

  发现 qt5.8 需要的 glibc 版本 比centos6.8 自带的高
  因此改装 qt4.8.6
  下载 http://download.qt.io/archive/qt/4.8/4.8.6/ 下的 qt-everywhere-opensource-src-4.8.6.tar.gz

  • 编译

  过程有点漫长,需要1h+

  ./configure
  Commercial Edition(商业版)
  Open Source Edition(开源版)
  选择开源版
  Do you accept the terms of either license?
  输入yes

  gmake

  编译过程中会报错如下

Project ERROR: Package gstreamer-app-0.10 not found
gmake[1]: *** [WebCore/Makefile.WebKit] 错误 2
gmake[1]: Leaving directory `/root/qt-everywhere-opensource-src-4.8.6/src/3rdparty/webkit/Source'

  解决:  yum install gstreamer-plugins-base-devel

  • 安装

  gmake install

  qt4.8.6 安装完成

  • 配置

  设置 环境变量 QTDIR
  export QTDIR=/usr/local/Trolltech/Qt-4.8.6

  

2. 编译安装liteide

2.1 准备

  已装好 go环境和qt和gdb

2.1 编译安装  

  进入GOPATHT目录,get 源码

  cd /goWork/src/github.com

  mkdir visualfc

  cd visualfc

  git clone https://github.com/visualfc/liteide

  cd liteide/build
  ./build_linux.sh
  报错 需要 github.com/visualfc/gotools
  go get github.com/visualfc/gotools
  继续 ./build_linux.sh
  又报错 需要 github.com/visualfc/gocode
  go get github.com/visualfc/gocode

  可能还会报类似的依赖错误,一一解决即可

  ./build_linux.sh
  然后
  ./deploy_linux_qt4.8_webkit.sh

  运行

  cd ./liteide/bin

  创建个快捷方式,然后把快捷方式移到桌面,双击打开

  或 ./liteide &

2.2 修改环境变量

  盗用一张windows平台的图片,大同小异,主要是设置相关环境变量

问题:

  • 必须将 go 环境 bin目录下的 gotools(跳转)和gocode(自动补全) 跟 liteide 执行文件放在一起(liteide/bin),LiteIDE才能正常使用,否则 “不能跳转”、“不能自动补全”
  • 将 liteide clone到 github.com/visualfc/liteide 目录,进入build目录编译,然后 进入 liteide/build/liteide/bin 执行,liteide报段错误

    解决:将 liteide clone到  github.com/liteide 然后进行编译

liteide 文档大全

https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/install.md
https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/zh_CN

https://github.com/visualfc/

 

posted @ 2017-04-07 15:47  大漠垂杨  阅读(1360)  评论(0编辑  收藏  举报