一、先配置sources.list
Debian篇——Debian12的sources.list文件配置
二、基本环境部署安装(安装时提示找不到的库,需要修改一下版本 ,安装你能找得到的版本)
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install python3-pip
#---pip3 install报错参考文章:https://blog.csdn.net/u011391361/article/details/136470825?spm=1001.2014.3001.5501
sudo pip3 install defusedxml
sudo pip3 install rospkg
sudo pip3 install netifaces
sudo pip3 install empy
sudo pip3 install pycrypto
sudo pip3 install pycryptodomex
sudo pip3 install wheel
sudo pip3 install sip
sudo pip3 install gnupg
#---安装时提示...ReadTimeoutError: HTTPSConnectionPool...重试即可
#---安装gnupg时如果在安装setuptools的时候报错,按如下方法解决
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-69.1.1.tar.gz
tar -zxvf setuptools-69.1.1.tar.gz
cd setuptools-69.1.1/
python3 setup.py build
python3 setup.py install
然后再重试sudo pip3 install gnupg,第一次可能还会报错,再试一次即可
sudo apt-get install zip
sudo apt-get install libboost1.74-all-dev
sudo apt-get install liblog4cxx15
sudo apt-get install liblog4cxx-dev
sudo apt-get install liblog4cxx-doc
sudo apt-get install libtinyxml2-9
sudo apt-get install libtinyxml2-dev
sudo apt-get install libtinyxml-dev libtinyxml-doc
sudo apt-get install ogre-1.12-tools
sudo apt-get install assimp-utils
sudo apt-get install libyaml-cpp0.7
sudo apt-get install libyaml-dev
sudo apt-get install libyaml-cpp-dev
sudo apt-get install libpoco-dev
sudo apt-get install libpocofoundation80
sudo apt-get install liburdfdom-tools
sudo apt-get install liburdfdom-headers-dev
sudo apt-get install liburdfdom-dev
sudo apt-get install python3-pyassimp libassimp-dev
sudo apt-get install libcollada-dom2.4-dp-dev
sudo apt-get install python3-sip python3-sip-dev
sudo apt-get install liblz4-dev
sudo apt-get install libogre-1.12-dev
sudo apt-get install python3-netifaces python3-defusedxml
sudo apt-get install libconsole-bridge1.0 libconsole-bridge-dev -y
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install liborocos-kdl-dev
sudo apt-get install qtcreator
sudo apt-get install libbullet-dev
sudo apt-get install libopencv-dev
#---安装pyqt(能装多少装多少,部分实在无法安装就跳过,一般也不在debian上直接跑图形界面)
sudo apt-get install python3-pyqt5 pyqt5-dev python3-sip-dev pyqt5-dev-tools
sudo apt-get install pyqt5*
sudo apt-get install qttools5-dev-tools
sudo pip3 install -v pyqt5==5.15.2 -i https://mirror.baidu.com/pypi/simple (存疑,安装可能失败)
sudo pip3 install pybind11 -i https://mirror.baidu.com/pypi/simple
sudo apt-get install libopencv-dev
sudo apt-get install libgtest-dev -y
sudo apt-get install libuvc-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libbz2-dev
sudo apt-get install liblzma-dev
sudo apt-get install libgpgme-dev
sudo apt-get install libpcl-dev
sudo apt-get install jskeus-dev
sudo apt-get install python3-gpg
sudo apt-get install libgpgme-dev
sudo apt-get install libturbojpeg0
sudo apt-get install libglfw3-dev
sudo apt-get install libturbojpeg0-dev
三、下载ros noetic源码并编译
#---csdn下载:https://download.csdn.net/download/TJXUNwu/87522092?spm=1001.2014.3001.5501
#---或者百度网盘下载:https://pan.baidu.com/s/1zKFcee2G-dydpk7qY_t8UA?pwd=5555
#---进入debian12系统
cd
mkdir ros_noetic
#---将下载好的压缩包放到ros_noetic目录下解压,会生成src文件夹
#---防止从Windows下载后文件权限变化,可以给整个解压后的src文件夹所有文件777权限。
cd ros_noetic
sudo chmod 777 src -R
#---然后开始编译,根据你的debian的cpu核数决定用多少个核编译,不要用全部的核编译,系统会卡住
#---如果只有2个核,那么就用-j1
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -j2