风泥

导航

centos

CentOS 配置开发环境

1. 安装git

参考文档:http://www.mamicode.com/info-detail-1903057.html
下载地址:https://git-scm.com/downloads

  • 使用git碰到的问题
    1. fatal: HTTP request failed
      • 操作过程:
        使用clone命令:git clone https://git.xxxx.com/xxx/xxx.git
      • 提示错误:fatal: HTTP request failed
      • 产生原因:git版本过低
      • 解决方法:升级git
        git --version //查看使用的git版本
        根据上面参考文档和下载地址安装git

2. 安装virtual box增强工具

  • 安装
    1. 错误:
      Makefile:181: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
      • 解决方法:
        sudo yum install kernel-devel gcc
  • 使用VirtualBox实现文件夹共享
    1. 错误:The folder contents could not be displayed
      • 解决方法:将当前用户添加到vboxsf用户组
        1. sudo usermod -a -G vboxsf 用户名
        2. 重启电脑
  • 重新分配空间
    最后用VBoxManager对转好的vdi文件进行扩容设置
    C:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd e:\vbox\Ubuntu12.04\Ubunt
    u1204-201310-disk1.vdi –resize 30000
    0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

安装Qt

  1. 提示glibc2.14缺少
    参考文档:http://blog.sina.com.cn/s/blog_b7baa8c90102w7gm.html
  2. 提示少libstdc++.so.6
    yum install libstdc++.so.6
  3. CentOS遇到Qt编译问题的解决方案(error: cannot find -lGL)
    参考文档:https://blog.csdn.net/libaineu2004/article/details/49162903

安装log4cpBus

参考文档:http://blog.csdn.net/xiexievv/article/details/50480933

Boost

1. 安装

参考文档:http://blog.csdn.net/this_capslock/article/details/47170313
下载地址:https://nchc.dl.sourceforge.net/project/boost/boost/1.49.0/boost_1_49_0.tar.bz2

1. 卸载Boost

yum remove libboost
1. 编译问题:
/usr/bin/ld: /home/jinhuan/dev_env/ZCHX_3rdParty/boost/1_57_0/lib/libboost_thread.a(thread.o): relocation R_X86_64_32 against `.text’ can not be used when making a shared object; recompile with -fPIC
/home/jinhuan/dev_env/ZCHX_3rdParty/boost/1_57_0/lib/libboost_thread.a: error adding symbols: Bad value
2. 解决方法:
参考文档:http://blog.csdn.net/lzshlzsh/article/details/50110771
重新编译boost: http://blog.csdn.net/ericdm/article/details/16969937
3. 编译Boost动态库
参考文档:https://www.cnblogs.com/lidabo/p/3782193.html

安装probobuf

参考文档:http://www.linuxidc.com/Linux/2016-12/138716.htm

编译升级gcc

参考文档:http://www.linuxidc.com/Linux/2015-01/112595.htm

安装Eclipse

安装完成后打开cpp等文件,Eclipse崩溃:
解决方法:
编辑eclipse.ini
添加一个启动参数
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false

安装sodium

下载地址:https://download.libsodium.org/libsodium/releases/

安装gtest

下载地址:https://github.com/google/googletest

安装VSCode

参考文档:http://blog.csdn.net/zdhsoft/article/details/73457259
sudo rpm –import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c ‘echo -e “[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packa

设置/修改程序依赖库路径

参考文档:http://blog.csdn.net/renwotao2009/article/details/51398739

安装zmq

参考文档:http://www.mamicode.com/info-detail-966786.html

posted on 2017-11-01 20:27  风泥  阅读(207)  评论(0编辑  收藏  举报