librealsense on Raspberry Pi 2, Raspberry OS bookworm and Python 3.11

This took 12h (!) on a Raspberry Pi 2

install SSL

sudo apt-get install libssl-dev

install cmake

$ cd ~
$ wget https://cmake.org/files/v3.28/cmake-3.28.3.tar.gz
$ tar -zxvf cmake-3.28.3.tar.gz; rm cmake-3.28.3.tar.gz
$ cd cmake-3.28.3
$ ./configure –prefix=/home/pi/cmake-3.28.3
$ make -j1
$ sudo make install
$ export PATH=/home/pi/cmake-3.28.3/bin:$PATH
$ source ~/.bashrc

cmake --version
sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048
sudo /etc/init.d/dphys-swapfile restart swapon -s
sudo apt install ninja-build
sudo apt-get install libtool
sudo apt install libudev-dev

install librealsense

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
export VCPKG_FORCE_SYSTEM_BINARIES=1
./bootstrap-vcpkg.sh
./vcpkg integrate install # This took 12h (!) on a Raspberry Pi 2
./vcpkg install realsense2

build pyrealsense Python bindings

  • sudo apt-get install xorg-dev libglu1-mesa-dev
  • sudo apt-get install libusb-1.0-0-dev
  • git clone https://github.com/IntelRealSense/librealsense.git
  • cd librealsense/
  • mkdir build
  • cd build
  • export PATH=/home/pi/cmake-3.28.3/bin:$PATH
  • cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/usr/bin/python3
  • make -j4 # omg this is gonna take 12h again, right? fml
  • sudo make install


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert