注:安装只适合1404,ubuntu1604安装慎重
1.安装ubuntu1404重要的分区:swap分区:逻辑分区,8GB,/swap;
/boot: ext4,逻辑分区,200MB; 将启动安装到此盘
/根目录:ext4:30GB,主分区或逻辑分区,
/home:ext4,逻辑分区,剩余
注:1.如果在自己主机上单独安装,而不是在服务器上,则无需/home分区,把剩余分区都给根目录 2. 将“安装启动引导器的设备”设置成boot所在的盘,否则不能正确引导启动
2.虚拟机安装ubuntu1404:http://jingyan.baidu.com/article/0320e2c1ef9f6c1b87507bf6.html
3.虚拟机: .ssh远程安装如下:$sudo apt-get update && sudo apt-get install openssh-server
4.ros-indigo安装:http://www.jianshu.com/p/04be841e2293
如下:$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update ( sudo apt-get upgrade)&& sudo apt-get install ros-indigo-desktop-full
$ sudo rosdep init
$ rosdep update
$ sudo apt-get install python-rosinstall
$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
5.ubuntu1404 openCV2.4.13安装:http://www.cnblogs.com/MnsterLu/p/5858557.html
$mkdir release
$sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
$cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv214 ..
$ sudo make install
6.openCV3.1安装过程:http://blog.csdn.net/yehuohan/article/details/51327465;
openCV下载网址:https://opencv.org/releases.html$
7.卸载openCV:http://blog.csdn.net/xulingqiang/article/details/52496701
$cd release && sudo make uninstall
$ sudo rm -rf release
$sudo rm -rf /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv
8.OpenCV多版本共存:a.将两个版本安装在 /usr/local/opencv2*&3* (即CMAKE_INSTALL_PREFIX=/usr/local/opencv2*&3*),
b.在CMakeLists的project前设置:set(OpenCV_DIR "/home/xxx/opencv2*/release"),
c.在Find_package(OpenCV REQUIRED)这里写上相应版本号
9.latex安装:http://jingyan.baidu.com/article/7c6fb4280b024180642c90e4.html
10.解决Ubuntu下vi编辑器: $sudo apt-get remove vim-common
$sudo apt-get install vim
11.linux下Atom安装 :$sudo add-apt-repository ppa:webupd8team/atom
$sudo apt-get update
$sudo apt-get install atom
12.Openni2的安装:$sudo apt-get install ros-indigo-rgbd-launch ros-indigo-openni2-camera ros-indigo-openni2-launch
13.PCL的简单安装:$sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
$sudo apt-get update
$sudo apt-get install libpcl-all
ubuntu1604 : $sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
$sudo apt-get update
$sudo apt-get install libpcl-dev
14. python3.x的安装:首先ubuntu自带python2.7.6和python3.4.3,对于想使用python3.x的需要基于python3安装相应的依库,切记不可删除ubuntu自带的python,亦不可将/usr/bin/python->python3上,这样系统会出现错误。建议安装anaconda,会自带最新python,见https://blog.csdn.net/xranmail/article/details/85275373第一步。
15.增加swap交换内存:$sudo dd if=/dev/zero of=swapfile bs=1024 count=8000000&&
$sudo mkswap swapfile && sudo swapon swapfile (https://www.imooc.com/article/16573)
16. 安装五笔拼音:$killall ibus-daemon
$sudo apt-get purge ibus ibus-gtk ibus-gtk3 ibus-pinyin* ibus-sunpinyin ibus-table python-ibus
$rm -rf ~/.config/ibus
$sudo add-apt-repository ppa:fcitx-team/nightly && sudo apt-get update
$sudo apt-get install fcitx-table-wbpy
$sudo apt-get install unity-control-center (https://blog.csdn.net/zzqLivecn/article/details/25018203),安装结束后重启即可。
17.ubuntu的备份与还原,还没有试过是否成功:https://cloud.tencent.com/developer/article/1349201
18.慎用或不用autoremove, 许多不负责的博客给出autoremove来卸载,结果悲剧了,把不想卸载的全卸载了,而且还无法重新恢复。
19.多版本boost共存情况: $sudo apt-get install libboost-dev 使用这个命令安装的是boost1.54安装到默认路径即/usr/local下,头文件和库文件分别位于/usr/local/include和/usr/local/lib中,
如若安装两个片本boost,boost1.5x和boost1.6x, 下载两个版本的boost并解压,
$./bootstrap.sh --with-libraries=all
新建目录: $ mkidr /usr/local/boost1.5x or boost1.6x
$ ./b2 && $sudo ./b2 install --prefix=/usr/local/boost1.5x or boost1.6x
这样安装完后头文件和lib文件就分别位于/usr/local/boost1.5x/6x下的include和lib文件下
为项目指定boost库 1.CMake: cmake -DBOOST_ROOT=/usr/local/boost1.5x or 1.6x
2. CMakeLists.txt中: set(BOOST_ROOT "/usr/local/boost1.5x") or set(BOOST_ROOT "/usr/local/boost1.6x")
20.G++版本升级: 添加源
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
安装依赖的包(出现错误才需要这个)
sudo apt-get install software-properties-common
升级安装
sudo apt-get install gcc-5 g++-5
更新链接
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc -f
sudo ln -s /usr/bin/g++-5 /usr/bin/g++ -f
21.如果autoremove误删进入不了桌面问题:1、启动Ubuntu系统,Alt+Ctrl+F4进入命令行;
2、按提示输入用户名和密码;
3、输入sudo apt-get install ubuntu-minimal ubuntu-standard ubuntu-desktop;
4、等待安装结束输入:sudo reboot重新启动
或输入命令:startx 即可进入桌面。(此方法无法解决ros出现的问题)
22.cmake3.11.3的安装
$ wget http://www.cmake.org/files/v3.11/cmake-3.11.3.tar.gz (或者下载其他版本安装)
$ tar xf cmake-3.11.3.tar.gz
$ cd cmake-3.11.3
$ ./configure
$ make
$ sudo make install
23.开机自启动命令: $ gnome-session-properties, 启动之后添加可执行文件,注意,所要启动的文件一件是一个可执行文件(+x)
23. ubuntu matlab2015b的安装:
24.使用roscore出现以下问题时:
[rosout-1] restarting process
/opt/ros/indigo/lib/rosout/rosout: error while loading shared libraries: libroscpp.so: cannot open shared object file: No such file or directory
process[rosout-1]: started with pid [4305]
[rosout-1] process has died [pid 4305, exit code 127, cmd /opt/ros/indigo/lib/rosout/rosout __name:=rosout __log
解决方法如下: 在.bashrc文件中添加LD_LIBRARY_PATH=/opt/ros/indigo/lib