以下是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. .net core +gogs + jenkins +docker自动化发布、部署

    1.首先,安装docker,不多bb 2.我们采用docker的方式安装jenkins,同时将宿主机的docker挂载到docker安装的jenkins里面,可能有点拗口.说白了就是 就是要让jenk ...

  2. Sublime Text 开发神器相关 插件安装 功能介绍

    无法安装更多见http://blog.csdn.net/freshlover/article/details/44261229/ Sublime Text 3 安装插件管理 Package Contr ...

  3. 关于困惑已久的var self=this的解释

    首先说下this这个对象的由来(属于个人理解):每个函数在定义被ECMAScript解析器解析时,都会创建两个特殊的变量:this和arguments,换句话说,每个函数都有属于自己的this对象,这 ...

  4. centos安装mysql(for 小白)

    安装前提: 安装号centos.SecureCRT 安装准备: centos自带数据库Mariadb,先将其移除 下载mysql: 镜像网址:http://mirrors.sohu.com/mysql ...

  5. Django rest-framework框架-content-type

    表结构讨论: 是用一张表价格策略表来记录两种不同的价格策略 content-type原理: 使用一张表来记录不同课程的价目,增加一行表名称 注释: 适用于多张表关联一张表的情况 会自动生成这种的结构: ...

  6. java封装数据类型——Long

    Long 是长整型 long 的封装数据类型.我们知道 long 相对于 int 的差异就是数据表示的范围扩大了,其它大部分特性都是一样的.所以 Long 跟 Integer 大部分方法都是相同的. ...

  7. springboot启动流程(三)Environment简介

    所有文章 https://www.cnblogs.com/lay2017/p/11478237.html 简介 上一篇文章中,我们简单了解了一下SpringApplication的run方法的代码逻辑 ...

  8. C++ ifstream ofstream 注意事项

    很久没写C++,已经完全不会写了... 在使用ifstream读取一个二进制文件时,发现读取的内容和源文件不相同,导致数据解析失败,于是尝试把用ifstream读取的内容用ofstream写入另一个文 ...

  9. sudo命令 sudoers文件

    超级用户权限 # Host alias specification Host_Alias HA = 192.168.1.1, 192.168.1.2 # User alias specificatio ...

  10. LeetCode 【2】 Reverse Integer --007

    六月箴言 万物之中,希望最美:最美之物,永不凋零.—— 斯蒂芬·金 第二周算法记录 007 -- Reverse Integer (整数反转) 题干英文版: Given a 32-bit signed ...