1.pwd:显示当前路径
2. rm -rf * :删除当前文件夹内的所有内容
3.make -j3:4个CPU时,最快速度make
4.find / -name “ ×××” :全盘寻找×××
5.mv aa bb:将aa更名为bb
6.cp 文件 待移动位置:复制
复制文件夹:cp -r 文件 待移动位置
7.make clean 删除之前make生成的一些文件
8.catkin_init_workspace 初始化工作区
9. sudo apt-get check检查是否有包有异常
10. /home/david/MySoft/Eigen3/Eigen/src/Core/util/Macros.h 里面可查看当前eigen的使用版本。
11.python --version 查看当前python版本
12.切换python2和python3:
echo alias python=python2 >> ~/.bashrc
source ~/.bashrc //指定为python2
echo alias python=python3 >> ~/.bashrc
source ~/.bashrc //指定为python3
13.不同版本的OpenCV间相互切换
不同版本的OpenCV编译好后,都会生成一个 OpenCVConfig.cmake,这个文件中指定了对应库函数和头文件的位置。在本教程的情况下,OpenCV2对应的OpenCVConfig.cmake在/usr/local/opencv2/share/OpenCV,OpenCV3对应的OpenCVConfig.cmake在/usr/local/opencv3/share/OpenCV。因此,如果要使用那个版本的OpenCV只需要将对应版本OpenCVConfig.cmake的路径写入CMakeLists.txt即可。这就是说,当自己所写的程序使用到OpenCV3时,在 FIND_PACKAGE( OpenCV REQUIRED ) 前,添加set(OpenCV_DIR “/usr/local/opencv3/share/OpenCV”) 这样计算机就找到OpenCV3的对应头文件和库文件了,如果使用OpenCV2,那么添加set(OpenCV_DIR “/usr/local/opencv2/share/OpenCV”)在FIND_PACKAGE( OpenCV REQUIRED ) 前就好。比如下面是一个使用OpenCV3的例子。
CMAKE_MINIMUM_REQUIRED( VERSION 2.8)
PROJECT(useOpenCV)
set(OpenCV_DIR "/usr/local/opencv3/share/OpenCV")
FIND_PACKAGE(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
add_executable(useOpenCV useOpenCV.cpp)
TARGET_LINK_LIBRARIES(useOpenCV ${OpenCV_LIBRARIES})
14.pkg-config --modversion opencv :查看opencv版本
15.E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt-get -f install”(也可以指定一个解决办法)
直接在终端输入sudo apt-get --fix-broken install即可解决问题。
16.第二次血的教训:sudo apt-get autoremove libtiff5-dev 不能随便用!!!
zp@zp:~/opencv-3.3.1/build$ sudo apt-get autoremove libtiff5-dev
[sudo] zp 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包将被【卸载】:
fltk1.3-doc fluid gazebo7 gazebo7-common gazebo7-plugin-base google-mock
hddtemp hdf5-helpers libaec-dev libapr1-dev libaprutil1-dev libarmadillo6
libarpack2 libbulletcollision2.83.6 libbulletdynamics2.83.6
libcollada-dom2.4-dp-dev libcollada-dom2.4-dp0 libconsole-bridge-dev
libconsole-bridge0.2v5 libcurl4-openssl-dev libcv-dev libcvaux-dev
libdap-dev libdap17v5 libdapclient6v5 libdapserver7v5 libepsilon1
libfltk-cairo1.3 libfltk-forms1.3 libfltk-gl1.3 libfltk-images1.3 libfltk1.3
libfltk1.3-dev libfreeimage-dev libfreeimage3 libfreexl1 libgazebo7
libgazebo7-dev libgdal-dev libgdal1i libgeos-3.5.0 libgeos-c1v5 libgeos-dev
libgif-dev libgl2ps-dev libgtkglext1 libgts-0.7-5 libgts-bin libgts-dev
libhdf4-0-alt libhdf4-alt-dev libhdf5-cpp-11 libhdf5-dev libhdf5-mpi-dev
libhdf5-openmpi-10 libhdf5-openmpi-dev libhighgui-dev libignition-math2
libignition-math2-dev libilmbase-dev libinput-dev libjbig-dev libjsoncpp-dev
libjxr0 libkmlbase1 libkmldom1 libkmlengine1 libldap2-dev
liblinearmath2.83.6 liblog4cxx-dev liblog4cxx10-dev liblog4cxx10v5
liblz4-dev liblzma-dev libnetcdf-cxx-legacy-dev libnetcdf-dev libogdi3.2
libogg-dev libogre-1.9-dev libogre-1.9.0v5 libopencv-calib3d-dev
libopencv-calib3d2.4v5 libopencv-contrib-dev libopencv-contrib2.4v5
libopencv-core-dev libopencv-dev libopencv-features2d-dev
libopencv-flann-dev libopencv-gpu-dev libopencv-gpu2.4v5
libopencv-highgui-dev libopencv-highgui2.4v5 libopencv-imgproc-dev
libopencv-legacy-dev libopencv-legacy2.4v5 libopencv-ml-dev
libopencv-ml2.4v5 libopencv-objdetect-dev libopencv-objdetect2.4v5
libopencv-ocl-dev libopencv-ocl2.4v5 libopencv-photo-dev
libopencv-photo2.4v5 libopencv-stitching-dev libopencv-stitching2.4v5
libopencv-superres-dev libopencv-superres2.4v5 libopencv-ts-dev
libopencv-ts2.4v5 libopencv-video-dev libopencv-video2.4v5
libopencv-videostab-dev libopencv-videostab2.4v5 libopencv2.4-java
libopencv2.4-jni libopenexr-dev libopenjp2-7 libopenni-dev
libopenni-sensor-pointclouds0 libopenni0 libpcl-apps1.7 libpcl-common1.7
libpcl-dev libpcl-features1.7 libpcl-filters1.7 libpcl-io1.7
libpcl-kdtree1.7 libpcl-keypoints1.7 libpcl-octree1.7 libpcl-outofcore1.7
libpcl-people1.7 libpcl-recognition1.7 libpcl-registration1.7
libpcl-sample-consensus1.7 libpcl-search1.7 libpcl-segmentation1.7
libpcl-surface1.7 libpcl-tracking1.7 libpcl-visualization1.7 libpcl1.7
libprotoc-dev libprotoc9v5 libpyside-py3-2.0 libpyside2-dev libpyside2.0
libqgsttools-p1 libqt5clucene5 libqt5designer5 libqt5designercomponents5
libqt5help5 libqt5multimediaquick-p5 libqt5multimediawidgets5
libqt5quickparticles5 libqt5script5 libqt5scripttools5 libqt5svg5-dev
libqt5webkit5-dev libqt5x11extras5 libqt5x11extras5-dev libqt5xmlpatterns5
libqt5xmlpatterns5-dev libqt5xmlpatterns5-private-dev libqtwebkit-dev
libsctp-dev libsctp1 libsdformat4 libsdformat4-dev libshiboken-py3-2.0
libshiboken2-dev libshiboken2.0 libsimbody-dev libsimbody3.5v5
libspatialite-dev libspatialite7 libspnav0 libsuperlu4 libtar-dev libtar0
libtheora-dev libtiff5-dev libtiffxx5 libtinyxml-dev libtinyxml2-2v5
libtinyxml2-dev liburdfdom-dev liburdfdom-headers-dev
liburdfdom-model-state0.4 liburdfdom-model0.4 liburdfdom-sensor0.4
liburdfdom-tools liburdfdom-world0.4 liburiparser1 libvtk6-dev libvtk6-java
libvtk6-qt-dev libvtk6.2 libvtk6.2-qt libwebp-dev libxerces-c-dev
libxerces-c3.1 libxml2-dev libxss-dev opencv-data openni-utils pyqt5-dev
python-attr python-autobahn python-defusedxml python-empy python-lz4
python-mpi4py python-msgpack python-netifaces python-opengl python-pam
python-psutil python-pyasn1-modules python-pydot python-pyqt5
python-pyqt5.qtopengl python-pyqt5.qtsvg python-pyqt5.qtwebkit
python-pyside2 python-pyside2.qtconcurrent python-pyside2.qtcore
python-pyside2.qtgui python-pyside2.qthelp python-pyside2.qtnetwork
python-pyside2.qtprintsupport python-pyside2.qtqml python-pyside2.qtquick
python-pyside2.qtquickwidgets python-pyside2.qtscript python-pyside2.qtsql
python-pyside2.qtsvg python-pyside2.qttest python-pyside2.qtuitools
python-pyside2.qtwebkit python-pyside2.qtwebkitwidgets
python-pyside2.qtwidgets python-pyside2.qtx11extras python-pyside2.qtxml
python-serial python-service-identity python-sip-dev python-snappy
python-twisted python-twisted-bin python-twisted-core python-txaio
python-vtk6 python-wxtools qtbase5-private-dev qtdeclarative5-dev
qtdeclarative5-private-dev qtmultimedia5-dev qtscript5-dev
qtscript5-private-dev qttools5-dev qttools5-dev-tools qttools5-private-dev
ros-kinetic-actionlib ros-kinetic-actionlib-msgs
ros-kinetic-actionlib-tutorials ros-kinetic-angles ros-kinetic-bond
ros-kinetic-bond-core ros-kinetic-bondcpp ros-kinetic-bondpy
ros-kinetic-camera-calibration ros-kinetic-camera-calibration-parsers
ros-kinetic-camera-info-manager ros-kinetic-catkin ros-kinetic-class-loader
ros-kinetic-collada-parser ros-kinetic-collada-urdf ros-kinetic-common-msgs
ros-kinetic-common-tutorials ros-kinetic-compressed-depth-image-transport
ros-kinetic-compressed-image-transport ros-kinetic-control-msgs
ros-kinetic-cpp-common ros-kinetic-cv-bridge ros-kinetic-depth-image-proc
ros-kinetic-desktop ros-kinetic-desktop-full
ros-kinetic-diagnostic-aggregator ros-kinetic-diagnostic-analysis
ros-kinetic-diagnostic-common-diagnostics ros-kinetic-diagnostic-msgs
ros-kinetic-diagnostic-updater ros-kinetic-diagnostics
ros-kinetic-dynamic-reconfigure ros-kinetic-eigen-conversions
ros-kinetic-eigen-stl-containers ros-kinetic-executive-smach
ros-kinetic-filters ros-kinetic-gazebo-dev ros-kinetic-gazebo-msgs
ros-kinetic-gazebo-plugins ros-kinetic-gazebo-ros
ros-kinetic-gazebo-ros-pkgs ros-kinetic-gencpp ros-kinetic-geneus
ros-kinetic-genlisp ros-kinetic-genmsg ros-kinetic-gennodejs
ros-kinetic-genpy ros-kinetic-geometric-shapes ros-kinetic-geometry
ros-kinetic-geometry-msgs ros-kinetic-geometry-tutorials
ros-kinetic-gl-dependency ros-kinetic-image-common
ros-kinetic-image-geometry ros-kinetic-image-pipeline ros-kinetic-image-proc
ros-kinetic-image-publisher ros-kinetic-image-rotate
ros-kinetic-image-transport ros-kinetic-image-transport-plugins
ros-kinetic-image-view ros-kinetic-interactive-marker-tutorials
ros-kinetic-interactive-markers ros-kinetic-joint-state-publisher
ros-kinetic-kdl-conversions ros-kinetic-kdl-parser
ros-kinetic-laser-assembler ros-kinetic-laser-filters
ros-kinetic-laser-geometry ros-kinetic-laser-pipeline
ros-kinetic-librviz-tutorial ros-kinetic-map-msgs ros-kinetic-media-export
ros-kinetic-message-filters ros-kinetic-message-generation
ros-kinetic-message-runtime ros-kinetic-mk ros-kinetic-nav-msgs
ros-kinetic-nodelet ros-kinetic-nodelet-core ros-kinetic-nodelet-topic-tools
ros-kinetic-nodelet-tutorial-math ros-kinetic-octomap ros-kinetic-opencv3
ros-kinetic-orocos-kdl ros-kinetic-pcl-conversions ros-kinetic-pcl-msgs
ros-kinetic-pcl-ros ros-kinetic-perception ros-kinetic-perception-pcl
ros-kinetic-pluginlib ros-kinetic-pluginlib-tutorials
ros-kinetic-polled-camera ros-kinetic-python-orocos-kdl
ros-kinetic-python-qt-binding ros-kinetic-qt-dotgraph ros-kinetic-qt-gui
ros-kinetic-qt-gui-cpp ros-kinetic-qt-gui-py-common
ros-kinetic-qwt-dependency ros-kinetic-random-numbers
ros-kinetic-resource-retriever ros-kinetic-robot ros-kinetic-robot-model
ros-kinetic-robot-state-publisher ros-kinetic-ros ros-kinetic-ros-base
ros-kinetic-ros-comm ros-kinetic-ros-core ros-kinetic-ros-environment
ros-kinetic-ros-tutorials ros-kinetic-rosbag
ros-kinetic-rosbag-migration-rule ros-kinetic-rosbag-storage
ros-kinetic-rosbash ros-kinetic-rosboost-cfg ros-kinetic-rosbuild
ros-kinetic-rosclean ros-kinetic-rosconsole ros-kinetic-rosconsole-bridge
ros-kinetic-roscpp ros-kinetic-roscpp-core ros-kinetic-roscpp-serialization
ros-kinetic-roscpp-traits ros-kinetic-roscpp-tutorials ros-kinetic-roscreate
ros-kinetic-rosgraph ros-kinetic-rosgraph-msgs ros-kinetic-roslang
ros-kinetic-roslaunch ros-kinetic-roslib ros-kinetic-roslint
ros-kinetic-roslisp ros-kinetic-roslz4 ros-kinetic-rosmake
ros-kinetic-rosmaster ros-kinetic-rosmsg ros-kinetic-rosnode
ros-kinetic-rosout ros-kinetic-rospack ros-kinetic-rosparam
ros-kinetic-rospy ros-kinetic-rospy-tutorials ros-kinetic-rosservice
ros-kinetic-rostest ros-kinetic-rostime ros-kinetic-rostopic
ros-kinetic-rosunit ros-kinetic-roswtf ros-kinetic-rqt-action
ros-kinetic-rqt-bag ros-kinetic-rqt-bag-plugins
ros-kinetic-rqt-common-plugins ros-kinetic-rqt-console ros-kinetic-rqt-dep
ros-kinetic-rqt-graph ros-kinetic-rqt-gui ros-kinetic-rqt-gui-cpp
ros-kinetic-rqt-gui-py ros-kinetic-rqt-image-view ros-kinetic-rqt-launch
ros-kinetic-rqt-logger-level ros-kinetic-rqt-moveit ros-kinetic-rqt-msg
ros-kinetic-rqt-nav-view ros-kinetic-rqt-plot ros-kinetic-rqt-pose-view
ros-kinetic-rqt-publisher ros-kinetic-rqt-py-common
ros-kinetic-rqt-py-console ros-kinetic-rqt-reconfigure
ros-kinetic-rqt-robot-dashboard ros-kinetic-rqt-robot-monitor
ros-kinetic-rqt-robot-plugins ros-kinetic-rqt-robot-steering
ros-kinetic-rqt-runtime-monitor ros-kinetic-rqt-rviz
ros-kinetic-rqt-service-caller ros-kinetic-rqt-shell ros-kinetic-rqt-srv
ros-kinetic-rqt-tf-tree ros-kinetic-rqt-top ros-kinetic-rqt-topic
ros-kinetic-rqt-web ros-kinetic-rviz ros-kinetic-rviz-plugin-tutorials
ros-kinetic-rviz-python-tutorial ros-kinetic-self-test
ros-kinetic-sensor-msgs ros-kinetic-shape-msgs ros-kinetic-simulators
ros-kinetic-smach ros-kinetic-smach-msgs ros-kinetic-smach-ros
ros-kinetic-smclib ros-kinetic-stage ros-kinetic-stage-ros
ros-kinetic-std-msgs ros-kinetic-std-srvs ros-kinetic-stereo-image-proc
ros-kinetic-stereo-msgs ros-kinetic-tf ros-kinetic-tf-conversions
ros-kinetic-tf2 ros-kinetic-tf2-eigen ros-kinetic-tf2-geometry-msgs
ros-kinetic-tf2-kdl ros-kinetic-tf2-msgs ros-kinetic-tf2-py
ros-kinetic-tf2-ros ros-kinetic-theora-image-transport
ros-kinetic-topic-tools ros-kinetic-trajectory-msgs
ros-kinetic-turtle-actionlib ros-kinetic-turtle-tf ros-kinetic-turtle-tf2
ros-kinetic-turtlesim ros-kinetic-urdf ros-kinetic-urdf-parser-plugin
ros-kinetic-urdf-tutorial ros-kinetic-vision-opencv
ros-kinetic-visualization-marker-tutorials ros-kinetic-visualization-msgs
ros-kinetic-visualization-tutorials ros-kinetic-viz
ros-kinetic-webkit-dependency ros-kinetic-xacro ros-kinetic-xmlrpcpp sbcl
sdformat-sdf shiboken2 sip-dev tango-icon-theme tcl-dev tcl-vtk6 tcl8.6-dev
tk-dev tk8.6-dev ttf-dejavu-core ttf-liberation uuid-dev vtk6
x11proto-scrnsaver-dev
升级了 0 个软件包,新安装了 0 个软件包,要卸载 504 个软件包,有 258 个软件包未被升级。
解压缩后将会空出 1,707 MB 的空间。
您希望继续执行吗? [Y/n]
我选了是!!!!
好了重新走一波安装吧【手动微笑】万幸的是,这次卸载了哪些安装包还知道,可以一个一个地重新安装回来。笔芯笔芯。