# I can't get librealsense working on my Raspberry Pi 3

**URL:** <https://forums.balena.io/t/i-cant-get-librealsense-working-on-my-raspberry-pi-3/361703>\
**Category:** Project help\
**Tags:** raspberrypi3\
**Created:** [September 8, 2022, 5:31am UTC](https://forums.balena.io/t/i-cant-get-librealsense-working-on-my-raspberry-pi-3/361703 "2022-09-08T05:31:21Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![wolvi-lataniere](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wolvi-lataniere/32/8352_2.png) [@wolvi-lataniere](https://forums.balena.io/u/wolvi-lataniere)\
**Post date:** [September 15, 2022, 9:15am UTC](https://forums.balena.io/t/i-cant-get-librealsense-working-on-my-raspberry-pi-3/361703/26 "2022-09-15T09:15:27Z")

</div>

Hi @Sammidd,

I noticed multiple issues with your Dockerfile:

- You are using Debian Stretch as a base image, however this version reached end of life in July: [Debian -- News -- Debian 8 Long Term Support reaching end-of-life](https://www.debian.org/News/2020/20200709), I recommend going to Bullseye which is the latest LTS version,
- You left a `<key>` placeholder in your first RUN instruction. I had to dig a little for this one but figured out the key to use: 82B129927FA3303E

Using these two modifications I could build for a Rasberrypi3-64 fleet without issues using this Dockerfile:

```auto
# Build image for Raspberry Pi 4 Base 64
FROM balenalib/aarch64-debian:bullseye-build
LABEL io.balena.device-type="raspberrypi4-64"
RUN echo "deb http://archive.raspberrypi.org/debian bullseye main ui" >> /etc/apt/sources.list.d/raspi.list &&\
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 82B129927FA3303E

RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

RUN apt-get install -y python3 \
    python3-dev \
    python3-pip \
    python3-setuptools 

# Install and Build Librealsense (For D415 Intel RealSense Camera)
RUN apt-get install -y git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev cmake libglfw3-dev build-essential
RUN git clone https://github.com/IntelRealSense/librealsense.git
RUN cd librealsense/ && ./scripts/setup_udev_rules.sh
RUN mkdir build &&\
    cd build &&\
    cmake /librealsense/ -DBUILD_PYTHON_BINDINGS:bool=true -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DCMAKE_BUILD_TYPE=Release &&\
    make -j4 &&\
    make install

ENV LD_LIBRARY_PATH="/usr/local/lib"

ENV INITSYSTEM on

WORKDIR /usr/src/app
COPY ./app/ /usr/src/app/

CMD ["python3", "/usr/src/app/test_server.py"]

```

Let us know if it fixes your issue,

Aurélien

---

_[View the full topic](https://forums.balena.io/t/i-cant-get-librealsense-working-on-my-raspberry-pi-3/361703)._
