以下是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. Java后端HttpClient Post提交文件流 及服务端接收文件流

    客户端将文件转换为流发送: 依赖的包: <dependency> <groupId>org.apache.httpcomponents</groupId> < ...

  2. 认识:before和:after伪类

    有时候,我们需要大量的重复代码去实现一个非常简单的功能,这不仅浪费时间,而且效率低下,例如: <div class="aa">你好</div><div ...

  3. [LeetCode] 219. Contains Duplicate II ☆(存在重复元素2)

    每天一算:Contains Duplicate II 描述 给出1个整形数组nums和1个整数k,是否存在索引i和j,使得nums[i] == nums[j] 且i和j之间的差不超过k Example ...

  4. Linux下源码包安装Swoole及基本使用 转

    版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/msllws/article/details ...

  5. 【Linux】Linux基本命令

    一.Linux关机 shutdown -h 10 10min后关机 shutdown -h 10:00   10:00关机 shutdown -h now 或 halt 或 poweroff 立即关机 ...

  6. oracle 如何将带有,的一列分成多列

    select regexp_substr('1,2,3' , '[^,]+' , 1 , ROWNUM) FROM dual CONNECT BY ROWNUM<=LENGTH('1,2,3') ...

  7. Ubuntu 文件和目录常用命令

    目标 查看目录内容 ls 切换目录 cd 创建和删除操作 touch rm mkdir 拷贝和移动文件 cp mv 查看文件内容 cat more grep 其他 echo 重定向 > 和 &g ...

  8. Linux Backup: Hard Disk Clone with "dd"

      Most of Windows users may know "Norton Ghost". Norton Ghost is a backup software for har ...

  9. Jupyter Notebook 插件安装

    刚才安装notebook插件jupyter_contrib_nbextensions,搜了很多教程都没有作用.直到用了这个命令,一行解决. pip install jupyter_contrib_nb ...

  10. .NET Framework 概述

    文章标题:.NET Framework 概述 地址:https://docs.microsoft.com/zh-cn/dotnet/framework/get-started/overview NET ...