ubuntu安装开发环境:VSCode、golang、git、redis、sublime及go插件、boost库、thrift等

1.VSCode

方法一:

依次输入如下命令

1、sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make

2、sudo apt-get update

3、sudo apt-get install ubuntu-make

4、umake ide visual-studio-code

提示输入y即可

 

方法二:

在windows系统下载安装包,再使用共享文件夹在ubuntu下安装即可

原文链接:https://blog.csdn.net/q357010621/article/details/87891694

2.golang开发环境

参考:https://blog.csdn.net/runner668/article/details/80958496

环境变量配置:

export GOPATH=/home/wyy/golang/gopath

export GOROOT=/usr/local/go

export GOARCH=amd64

export GOOS=linux

export GOTOOLS=$GOROOT/pkg/tool

export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

 

3.git

参考:https://blog.csdn.net/vslyu/article/details/80337675

过程中终端打印信息中给出了ssh公钥的存储路径

安装成功后打印:

4.redis

下载源码安装:

  1. wget http://download.redis.io/redis-stable.tar.gz
  2. tar xzf redis-stable.tar.gz
  3. cd redis-stable
  4. make // make后在src文件夹中可以找到若干个可执行程序
  5. make install // make之后执行make install将这些可执行程序复制到/usr/local/bin目录中以便以后执行程序时可以不用输入完整的路径
  6. make test// 实际运行redis前可先 make test命令测试redis是否编译正确

make test的截图如下(make 后要make install 然后再make test 否则报错):

  1. redis-server//启动redis-server截图如下:

5. sublime Text 3的go sublime插件

https://www.cnblogs.com/jiy-for-you/p/6916977.html

插件列表中搜不到gosublime插件,解决办法:

https://www.cnblogs.com/chengxuyuan326260/p/10095914.html

关于过程中需要解压缩zip文件的说明如下:

  1. Ubuntu 16.04 已经自动安装了unzip 软件,解压命令:
    unzip FileName.zip
    2) 如果没有安装unzip,可以使用下面的命令安装:
    sudo apt install unzip
  1. 3) 安装unrar软件
    sudo apt install unrar

4) 解压rar文件:
unrar x FileName.rar

6.boost库(boost_1_70_1)

       https://blog.csdn.net/liuweizj12/article/details/90482006

7.安装thrift rpc框架

  1. 参考:http://blog.sina.com.cn/s/blog_567e650201010h5f.html

其中提到的依赖环境一定要安装,否则会在./confiure或者make过程中报错

  1. 报错:configure: error: "Error: libcrypto required."   

解决:https://blog.csdn.net/snake_baoby/article/details/8577224

  1. 报错:  Python.h: No such file or directory

Python.h:: command not found

解决: 上述参考过程中安装python相关的操作

  1. 在安装python相关的东西时报错:

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

解决:https://www.cnblogs.com/bigvase/p/7091512.html  //系统自带的源有缺失的文件,更新源就好了

  1. 重新安装:https://www.linuxidc.com/Linux/2011-12/50207.htm
  2. 运行https://blog.csdn.net/feng973/article/details/70160571中的client和server时报错:error while loading shared libraries: libthrift-0.8.0.so: cannot open shared object file: No such file or directory

解决:sudo ldconfig

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章