以下是ubuntu系统安装完成一些库后,验证查看各个库的安装情况。

1. CUDA8.0

yuanlibin@yuanlibin:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005 - 2016 NVIDIA Corporation
Built on Sun_Sep__4_22: 14 :01_CDT_2016
Cuda compilation tools, release 8.0 , V8. 0.44

cuda no的情况显示如下

yuanlibin@yuanlibin:~$ nvcc -V
The program ' nvcc ' is currently not installed. You can install it by typing:
sudo apt - get install nvidia-cuda- toolkit
yuanlibin@yuanlibin: ~$

注意:可能会出现以下情况,当安装完成cuda-9.2时,使用nvcc -V查看结果如下:

yuanlibin@yuanlibin:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) - NVIDIA Corporation
Built on Tue_Jun_12_23::04_CDT_2018
Cuda compilation tools, release 9.2, V9.2.148
yuanlibin@yuanlibin:~$

但是在cmake工程中的CMakeLists.txt文件中

find_package(CUDA REQUIRED)
message (STATUS "${CUDA_VERSION}")

显示是cuda版本是7.5。版本出现不一致问题,解决方法如下:

参考https://zhuanlan.zhihu.com/p/48641682 第6条

进入/usr/bin/nvcc,而实际上nvcc是应该在/usr/local/cuda/bin/nvcc。

所以,sudo gedit /usr/bin/nvcc,把里面的内容"exec /usr/lib/nvidia-cuda-toolkit/bin/nvcc" 改成"exec /usr/local/cuda/bin/nvcc"

问题解决,cmake检测到9.2版本的cuda。

查看显卡型号:

查看显卡型号:lspci |grep VGA (lspci是linux查看硬件信息的命令),屏幕会打印出主机的集显几独显信息

查看nvidia芯片信息:lspci |grep -i nvidia,会打印出nvidia系列的硬件信息,如果主机安装了没有视频输出的GPU(如tesla系列),这个命令会很有用。

yuanlb@yuanlb:~$ lspci |grep VGA
:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev )
yuanlb@yuanlb:~$ lspci |grep -i nvidia
yuanlb@yuanlb:~$

查看GPU及其驱动版本

查看GPU型号:

lspci | grep -i nvidia

查看NVIDIA驱动版本:

sudo dpkg --list | grep nvidia-*

tim@Tim:~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. tim@Tim:~$
yuanlibin@yuanlibin:~$ ls /dev/nvidia*
/dev/nvidia0 /dev/nvidia-modeset /dev/nvidia-uvm-tools
/dev/nvidiactl /dev/nvidia-uvm
yuanlibin@yuanlibin:~$ 
yuanlibin@yuanlibin:~$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 367.57 Mon Oct 3 20 : 37 : 01 PDT 2016
GCC version: gcc version 4.8 . 4 (Ubuntu 4.8 . 4 -2ubuntu1~ 14.04 . 3 )
yuanlibin@yuanlibin: ~$

2. OpenGL

glxinfo | grep OpenGL
yuanlibin@yuanlibin:~/libfreenect2/build$ glxinfo | grep OpenGL
OpenGL vendor string : NVIDIA Corporation
OpenGL renderer string : GeForce GTX 1060 6GB/PCIe/ SSE2
OpenGL core profile version string : 4.3 . 0 NVIDIA 375.20
OpenGL core profile shading language version string : 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string : 4.5 . 0 NVIDIA 375.20
OpenGL shading language version string : 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
yuanlibin@yuanlibin: ~/libfreenect2/build$

3. OpenCL(对NVIDIA的显卡来说,cuda安装完毕后OpenCL的环境自然就安装好了)

clinfo

4. ROS版本

If you are ever having problems finding or using your ROS packages make sure that you have your environment properly setup. A good way to check is to ensure that environment variables like ROS_ROOT and ROS_PACKAGE_PATH are set:

yuanlibin@yuanlibin:~$ printenv | grep ROS
ROS_ROOT =/opt/ros/indigo/share/ ros
ROS_PACKAGE_PATH =/opt/ros/indigo/share:/opt/ros/indigo/stacks:/home/yuanlibin/ORBSLAM2_with_pointcloud_map/ORB_SLAM2_modified/Examples/ ROS
ROS_MASTER_URI =http: // localhost:11311
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO = indigo
ROS_ETC_DIR =/opt/ros/indigo/etc/ ros
yuanlibin@yuanlibin: ~$

5. gcc

yuanlibin@yuanlibin:~$ gcc --version
gcc (Ubuntu 4.8.-2ubuntu1~14.04.) 4.8.
Copyright (C) Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. yuanlibin@yuanlibin:~$

6. 查询Ubuntu版本号

yuanlibin@yuanlibin:~$ sudo lsb_release -a
[sudo] password for yuanlibin:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 . 5 LTS
Release: 14.04
Codename: trusty
yuanlibin@yuanlibin: ~$
yuanlibin@yuanlibin:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04. LTS
Release: 16.04
Codename: xenial
yuanlibin@yuanlibin:~$

7. OpenCV

yuanlibin@yuanlibin:~$ pkg-config -- modversion opencv
2.4 . 9
yuanlibin@yuanlibin: ~$
pkg-config --cflags opencv
pkg-config --libs opencv

8. ROS版本

先打开一个终端输入

roscore

然后打开另一个终端输入

yuanlibin@yuanlibin:~ $ rosparam list
/ rosdistro
/roslaunch/uris/ host_yuanlibin__46870
/ rosversion
/ run_id
yuanlibin@yuanlibin: ~$ rosparam get / rosdistro
' indigo ' yuanlibin@yuanlibin: ~$

9. cmake

yuanlibin@ubuntu-Tim:~$ cmake -- version
cmake version 3.0 . 2 CMake suite maintained and supported by Kitware (kitware.com / cmake).
yuanlibin@ubuntu -Tim:~$

10. Qt

yuanlibin@yuanlibin:~/cloudcompare$ qmake - version
QMake version 3.0
Using Qt version 5.2 . 1 in /usr/lib/x86_64-linux- gnu
yuanlibin@yuanlibin: ~/cloudcompare$

11. g++

yuanlibin@yuanlibin:~$ g++ - v
Using built - in specs.
COLLECT_GCC =g++
COLLECT_LTO_WRAPPER =/usr/lib/gcc/x86_64-linux-gnu/ 4.8 /lto- wrapper
Target: x86_64 -linux- gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8 . 4 (Ubuntu 4.8 . 4 -2ubuntu1~ 14.04 . 3 )
yuanlibin@yuanlibin: ~$

12.查看内核版本

yuanlibin@yuanlibin:~$ uname -r
4.8.--generic
yuanlibin@yuanlibin:~$

13.查看mac地址

sudo lshw -C network
//或者
sudo lshw -C network | grep serial

14.python版本切换

默认版本一般为python2.7,将其切换到python3.5。

先将/usr/bin/python删除,然后将/usr/bin/python3.5复制到/usr/bin/python;想要切换回来即将/usr/bin/python2.7复制过来即可。

sudo rm /usr/bin/python
sudo cp /usr/bin/python3. /usr/bin/python

查看当前版本:

yuanlb@yuanlb:~$ python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>  

15.pcl库的版本

yuanlb@yuanlb:~$ sudo apt-get install libpcl-dev
[sudo] password for yuanlb:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpcl-dev is already the newest version (1.7.2-14build1).
libpcl-dev set to manually installed.
The following package was automatically installed and is no longer required:
snapd-login-service
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 296 not upgraded.
yuanlb@yuanlb:~$

16. 查找系统中有没某一库文件

vio@vio:~/boteye_ros/build$ sudo find / -name " libopencv_core.so.3.1* "
/usr/lib/x86_64-linux-gnu/libopencv_core.so. 3.1 .
/usr/lib/x86_64-linux- gnu/libopencv_core.so. 3.1
find: ' /run/user/ 1000 / gvfs': Permission denied
vio@vio: ~/boteye_ros/build$

持续更新中……

Ubuntu验证查看库的安装情况的更多相关文章

  1. Ubuntu下dlib库编译安装

    安装libboost 按照dlib的说明安装始终不成功,参考machine learning is fun作者的指导installing_dlib_on_macos_for_python.md,需要首 ...

  2. ubuntu下安装pthread的manpages(man 手册) 在Ubuntu中查看STL帮助

    http://blog.csdn.net/leisure512/article/details/4881391 由于学习多线程编程,所以用到pthread,但是man的时候却发现没有pthread函数 ...

  3. 在VMware中安装ubuntu出现菜单栏无法显示的情况

    在VMware中安装ubuntu出现菜单栏无法显示的情况 其实这个问题的原因时由于VMware中enable了3D图形加速界面,只需要shutdown当前运行的虚拟机,然后在虚拟机,设置,显示器,3D ...

  4. Ubuntu下查看软件版本及安装位置【转】

    Ubuntu下查看软件版本及安装位置 查看软件版本:     aptitude show xxx 也可用apt-show-versions (要先安装sudo apt-get install apt- ...

  5. ubuntu中查看已安装软件包的方法

    ubuntu中查看已安装软件包的方法: 方法一:在新立得软件包管理器中,打到已安装,便可以看看有多少包被安装. 如果想把这些包的信息复制到一文件里,可用下面的方法. 方法二:在终端输入 sudo dp ...

  6. ubuntu下查看服务器的CPU详细情况

    https://www.cnblogs.com/liuq/p/5623565.html 全面了解 Linux 服务器 - 1. 查看 Linux 服务器的 CPU 详细情况 ubuntu下查看服务器的 ...

  7. Python库的安装与查看

    安装库:    Step1:  win+r键打开此页面,并输入cmd     Step2 :键入cmd并点击确定    Step3 :键入语句:“ pip install 库名 “ 回车即可 这样库就 ...

  8. 【转】Ubuntu下查看软件版本及安装位置

    查看软件版本:aptitude show xxx 也可用apt-show-versions (要先安装sudo apt-get install apt-show-versions) 查看软件安装位置: ...

  9. ubuntu MySQL采用apt-get install安装目录情况

    安装服务器:root@ubuntu:/# apt-get install mysql-server-5.5 安装客户端:root@ubuntu:/# apt-get install mysql-cli ...

随机推荐

  1. 配置vue 多页面

    安装vue 1. 全局安装 vue-cli环境 npm install --global vue-cli 2. 创建一个基于webpack模板的新项目 vue init webpack my-proj ...

  2. 关于MQ的几件小事(六)消息积压在消息队列里怎么办

    1.大量消息在mq里积压了几个小时了还没解决 场景:几千万条数据在MQ里积压了七八个小时,从下午4点多,积压到了晚上很晚,10点多,11点多.线上故障了,这个时候要不然就是修复consumer的问题, ...

  3. 9.Redis的Java客户端Jedis

    Redis的Java客户端Jedis Jedis所需jar包   commons-pool-1.6.jar jedis-2.1.0.jar 1.Jedis常用操作(jedis中的api 和 我们在 l ...

  4. Sqlmap对dvwa进行sql注入测试

    前提准备条件: 1.下载安装dvwa,下载链接地址:http://www.dvwa.co.uk/.2.需要安装python运行环境.3.下载sqlmap包并将其解压. 一.查看所有的数据库;(其中db ...

  5. Mysql高可用集群-解决MMM单点故障

    目录 一.理论概述 组件介绍 三.部署 四.测试 五.总结 preface: MMM架构相比于MHA来说各方面都逊色不少,写这篇案例也算是整理下思路吧. 一.理论概述 MMM(Master-Maste ...

  6. 使用JavaScript实现录入信息生成名片

    首先是布局: 一个大的盒子模型套两个小的盒子模型:左边是录入信息生成界面,右边是名片显示界面. 框架: 这里新建一个css文件,用于外部链接使用装饰 /*最外层div,主框架*/ .frame{ wi ...

  7. 【Spring】源码浅析 - ResponseEntity.ok 转载

    https://www.jianshu.com/p/1238bfb29ee1 ResponseEntity.ok具体源码

  8. js中的分页

    分页是前端经常会用到的一个非常实用的一个知识点,今天闲来没事,做了一个小demo,虽然样子,比较丑,哈哈哈,但是这是分页的核心思想都在,希望能给某个小伙伴一些启发.可直接复制在编辑器中运行. < ...

  9. Paper Reading:Receptive Field Block Net for Accurate and Fast Object Detection

    论文:Receptive Field Block Net for Accurate and Fast Object Detection 发表时间:2018 发表作者:(Beihang Universi ...

  10. 0001SpringBoot整合Mybatis

    SpringBoot整合Mybatis主要分为以下几个步骤: 1.添加Mybatis的起步依赖(pom.xml) 2.添加数据库驱动坐标(pom.xml) 3.添加数据库连接信息(applicatio ...