Need Help Installing Phidget Libraries on Raspberry Pi OS (32-bit)

Supporting Linux and other Unixes
Post Reply
xESTEBANx
Fresh meat
Posts: 3
Joined: Wed Nov 20, 2024 10:38 am
Contact:

Need Help Installing Phidget Libraries on Raspberry Pi OS (32-bit)

Post by xESTEBANx »

Hello Phidgets Community,

I’m trying to install the Phidget22 libraries on Raspberry Pi 4 (1GB RAM) running Raspberry Pi OS (32-bit) but keep encountering issues. I’d appreciate any guidance to resolve this. Here’s what I’ve tried so far:

- Downloaded the libphidget22-1.15.20230616.tar.gz file from this page:
https://www.phidgets.com/downloads/phid ... phidget22/

- Transferred it to my Raspberry Pi and attempted to compile:

Code: Select all

tar -xzvf libphidget22-1.15.20230616.tar.gz
cd libphidget22-1.15.20230616
mkdir build && cd build
cmake ..
And error appear:

Code: Select all

CMake Error: The source directory does not appear to contain CMakeLists.txt
-Also tried installing via apt after adding the repository:

Code: Select all

sudo apt install libphidget22 libphidget22-dev
And Error:

Code: Select all

E: Unable to locate package libphidget22
What’s the recommended method to install the libraries on Raspberry Pi OS (32-bit)?

Thank you in advance for your help!
User avatar
Patrick
Lead Developer
Posts: 668
Joined: Mon Jun 20, 2005 8:46 am
Location: Calgary
Contact:

Re: Need Help Installing Phidget Libraries on Raspberry Pi OS (32-bit)

Post by Patrick »

I'd recommend you use the package install, and not compile from source. Installing the package repo is documented here: https://www.phidgets.com/docs/OS_-_Linux

If you do want to compile from source, we use make and not cmake. Have a look at the README.

-Patrick
xESTEBANx
Fresh meat
Posts: 3
Joined: Wed Nov 20, 2024 10:38 am
Contact:

Re: Need Help Installing Phidget Libraries on Raspberry Pi OS (32-bit)

Post by xESTEBANx »

Hi Patrick,

Thank you very much for your prompt response. I'm working on a project to control the temperature and pressure of a tank. I know mechanics but nothing about programming. Everything I've tried has been from forums, manuals, or with a little help from AI. I already tried installing that package, but I don't know what I'm doing wrong.

This is what I type in the Terminal:

Code: Select all

curl -fsSL http://www.phidgets.com/downloads/setup_linux | sudo -E bash - sudo apt install -y libphidget22

And the response I get is:

Code: Select all

/usr/bin/sudo: /usr/bin/sudo: cannot execute binary file
curl: (23) Failure writing output to destination
Can you explain how I can fix this?
Thank you very much in advance for your valuable help.
User avatar
Patrick
Lead Developer
Posts: 668
Joined: Mon Jun 20, 2005 8:46 am
Location: Calgary
Contact:

Re: Need Help Installing Phidget Libraries on Raspberry Pi OS (32-bit)

Post by Patrick »

I'm not sure what is going wrong with the install script - you should try the Package Install -> Manual Install method.

As root:

Code: Select all

wget -qO /usr/share/keyrings/phidgets.gpg \
  https://www.phidgets.com/gpgkey/pubring.gpg
echo deb [signed-by=/usr/share/keyrings/phidgets.gpg] \
  http://www.phidgets.com/debian distro main \
  > /etc/apt/sources.list.d/phidgets.list
Make sure to replace 'distro' with your distro (bookworm?).

Then, you can 'apt install libphidget22'

-Patrick
Post Reply