美文网首页
5. centos下安装openscenegraph环境

5. centos下安装openscenegraph环境

作者: yaoyao妖妖 | 来源:发表于2020-08-12 10:50 被阅读0次
  1. 配置OpenGL开发环境
# yum list mesa*
# yum install -y mesa*
# yum install -y freeglut*
# yum install -y *glew*
  1. 安装 gcc 编译器
yum -y install gcc gcc-c++  //安装gcc、c++编译器
  1. cmake 安装文件编译工具
    首先下载cmake 3.6,并解压,检查环境:
wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz    
tar xvf cmake-3.6.2.tar.gz && cd cmake-3.6.2/
./bootstrap

编译,安装:

gmake
gmake install

查看新版本:

/usr/local/bin/cmake --version

2. 编译软件,执行: OpenSceneGraph

cd OpenSceneGraph
cmake .
make
sudo make install
// 设置软链接
ln -s ./bin/osgconv /usr/local/bin/osgconv

3. 配置OSG环境变量

vim ~/.bashrc

// 在末尾处添加:
export PATH="${PATH}:/APP/osgb/openscenegraph-master/bin/"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/APP/osgb/openscenegraph-master/lib/"
// 完成后执行命令使配置生效:
source ~/.bashrc

// 将动态链接库加载到内存
sudo touch /etc/ld.so.conf.d/libc.conf
sudo echo "/usr/local/lib64" >> /etc/ld.so.conf.d/libc.conf
sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/libc.conf
sudo ldconfig

中间遇到的问题:我本地是虚拟机centos6安装的,遇到问题较多,如果在服务器上centos7安装,没有遇到下面的问题

1. 如果在make的时候报错,则需要更新升级gcc(每次都需要)

https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/
yum install centos-release-scl
yum install devtoolset-7
scl enable devtoolset-7 bash
gcc --version
tips:如果之前运行过,那么需要先删除之前生成的文件 rm -rf CMakeCache.txt CMakeFiles/

然后

cp -r /data/datadeal/openscenegraph-master/lib/* .

2. 解决解决 /lib64/libc.so.6: version `GLIBC_2.15' not found 问题

注意缺少的对应的版本去下载对应的版本

https://blog.csdn.net/huaishuming/article/details/102900254

3. 解决 libstdc++.so.6: version’GLIBCXX_3.4.20’的问题

http://www.vuln.cn/9154

https://www.jianshu.com/p/523fff017851
http://blog.chinaunix.net/uid-20620288-id-5747426.html
https://www.cnblogs.com/xiyushimei/p/8550930.html

相关文章

网友评论

      本文标题:5. centos下安装openscenegraph环境

      本文链接:https://www.haomeiwen.com/subject/wxajdktx.html