Invalid or corrupted package (PGP signature)

Hello,

I am using Manjaro Gnome 21.10 and am fairly new to arch-Linux since I am used to Debian. This is a bit of a learning curve for me , so I appreciate any help I can get.

I am following these instructions

https://github.com/Gadgetoid/pi400kb

from git hub to use my rpi400 as a keyboard for my pc (Since both my mini Pc and Rpi400 are sharing the same screen, so I would like to use the one keyboard to control them both; Hence the rpi400. --I know the rpi400 is a computer but I need the mini Pc to run apps that the RPi can’t like Steam and Sketchup (No, I don’t want to use VNC or SSH), So I just switch between them. )

Anyways, I got the files downloaded but I can’t get cmake to work. I just get the error:

bash: cmake: command not found

I tried downloading cmake from the Manjaro software store (The add/ remove software app) but it was corrupted and never installed. I also tried,

sudo pacman -S cmake

and it stated installing:

Packages (4) jsoncpp-1.9.4-1  libuv-1.42.0-1  rhash-1.4.2-1  cmake-3.21.3-1

The I got a couple corruption errors like this:

error: jsoncpp: signature from "Arch Linux ARM Build System <builder@archlinuxarm.org>" is unknown trust
:: File /var/cache/pacman/pkg/jsoncpp-1.9.4-1-aarch64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).

and I deleted the files, so basically nothing was installed.

Does anyone know how I can get this github keyboard program to install and work?

Thanks in advance.

Here’s a screenshot of what I did for installing the GitHub files can be found here on the rpi forums page (Since it won’t let me upload the screenshot): `

https://forums.raspberrypi.com/viewtopic.php?f=91&t=322289

`

Hi,
The github/cmake isnt your problem … its your packages/signatures.
This is going to happen with any package with that signature, and possibly others depending on the actual source of the problem.
See this:
https://wiki.manjaro.org/index.php/Pacman_troubleshooting#Errors_about_Keys
Though on arm you may have a different keyring. manjaro-arm-keyring
(please check which you have installed with pacman -Qs keyring and use those with instructions)

Once you have that all sorted out you may try your cmake install again.
And then your actual prize - the github project :slight_smile:

2 Likes

:point_up: What he said. I’ve edited your topic title accordingly and moved your post.

Welcome to the forum! :wave:

When you sort out your package installation issue, please feel free to create a new topic about building with Cmake if you still require assistance.

Thanks for your help!

I managed to get it to work. I tried following the instructions on the link to update/fix my package signatures but it didn’t work. So I ended up wiping the micro Sd and re-installing Manjaro Gnome. After that, I was able to download stuff and cmake by downloading cmake from the add/remove software app (I also downloaded libconfig because it needed it).

–>Now, I have one quick question, that you may/maynot be able to answer.
How do I run the code so I can use the pi400 keyboard on my mini pc once the usb-c cable is plugged into the usb port of the pc? Will it run automatically or do I have to run it/open it from the cmd terminal.

Thanks in advance.

Looking at the README they have it running from the command line in the root of the “source tree”/build directory after compiling. I would at least copy the resulting binary pi400kb to /usr/bin/ There is no “make install target.”

After copying pi400kb to /usr/bin/ it has to be run with sudo to start it sudo pi400kb.

I compiled it here and the steps were:


#Install required depends:
sudo pacman -S sudo pacman -S libconfig base-devel
git clone https://github.com/Gadgetoid/pi400kb
cd pi400kb
git submodule update --init
mkdir build && cd build
cmake ..
make -j4
chmod +x pi400kb
sudo cp pi400 /usr/local/bin/

Added dtoverlay=dwc2 to /boot/config.txt
sudo reboot

After reboot you have to manually load the libcomposite module before starting pi400kb:

sudo modprobe libcomposite
sudo pi400kb

It seems to be working but I do not have a usb type-c cable or a plain old usb to usb cable to see if it that work.

Do not close the window you started pi400kb or it will close out the program; just minimize it. Notice all mouse and keyboard events will report in the active window:

[ray@pi4 ~]$ sudo pi400kb 
Found keyboard at: /dev/hidraw1
Found mouse at: /dev/hidraw0
Grabbing Keyboard and/or Mouse
Grabbing: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd
Grabbing: /dev/input/by-id/usb-PixArt_USB_Optical_Mouse-event-mouse
Running...
M:0 f7 ff 0 
M:0 ef 0 0 
K:0 0 2c 0 0 0 0 0 
K:0 0 0 0 0 0 0 0
1 Like

Thank you so much! This helped out a lot!

It works beautifully! I am now able to use my pi400 as a keyboard for my mini pc!

The only thing that didn’t work was the mouse because it wasn’t recognized, but that’s no big deal (I might play around with the settings to get it to work, but this is perfect for now).

Thanks again.

1 Like

Guess you are using the RPi mouse that comes with the pi400 in a kit.

Try this:

[ray@pi4 ~]$ lsusb | grep Mouse
Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse

[ray@pi4 ~]$ ls /dev/input/by-id/usb-*event-mouse
/dev/input/by-id/usb-PixArt_USB_Optical_Mouse-event-mouse

In the git tree cd to pi400kb/build
sudo rm -r *

#All one line below here. Replace the italics with the bold above. Add the 0x below in bold.

cmake … -DMOUSE_DEV="/dev/input/by-id/usb-PixArt_USB_Optical_Mouse-event-mouse" -DMOUSE_VID=0x093a -DMOUSE_PID=0x2510

make -j4
sudo cp pi400 /usr/local/bin/

Test and see what it does.

No, actually I’m using a wireless mouse from my local Dollarstore.

But I’ll try what you mentioned above just to see if it works.

I do not know what is happening here but 3 dots is showing up after cmake above. It shows 2 in the edit window but 3 dots when I post. It is supposed to be cmake 2-dots like above when I had you run the command.

Hmm… weird.
Thanks for the heads up though.

Must be the special character following it. I wanted the command to be all on one line but the bold and italics will be messed up if I tried to wrap it with the Pre Formatted Text button. Sometimes you just can not do what you want to. lol…

Discourse (the forum software) assumes alot of stuff. Like when more than one period is used, it thinks it’s like a thinking pause.

But putting it in code blocks fixes it, and make it look great, except for the markdown stuff you had in the “code”.

I tried it and got:


  commander@B-400X   : lsusb

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04d9:0007 Holtek Semiconductor, Inc. Raspberry Pi Internal Keyboard
Bus 001 Device 007: ID 1d57:130f Xenta 2.4Ghz wireless optical mouse receiver
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 commander@B-400X   : ls /dev/input/by-id/usb-Xenta_2.4Ghz_wireless_optical_mouse_receiver-event-mouse

"/dev/input/by-id/usb-Xenta_2.4Ghz_wireless_optical_mouse_receiver-event-mouse": No such file or directory (os error 2)

   commander@B-400X   : cd pi400kb
 commander@B-400X  /pi400kb   main  : cd build

   commander@B-400X  /pi400kb/build   main  : sudo rm -r *

 commander@B-400X  /pi400kb/build   main  : cmake .. -DMOUSE_DEV=/dev/input/by-id/usb-Xenta_2.4Ghz_wireless_optical_mouse_receiver-event-mouse -DMOUSE_VID=0x1d57-DMOUSE_PID=0x130f

-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/commander/pi400kb/build

 commander@B-400X  /pi400kb/build   main  : make -j4

[ 17%] Building C object CMakeFiles/pi400kb.dir/pi400.c.o
[ 17%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg.c.o
[ 17%] Building C object CMakeFiles/pi400kb.dir/gadget-hid.c.o
[ 23%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg_common.c.o
/home/commander/pi400kb/pi400.c: In function ‘main’:
<command-line>: error: ‘DMOUSE_PID’ undeclared (first use in this function); did you mean ‘MOUSE_PID’?
/home/commander/pi400kb/pi400.c:138:44: note: in expansion of macro ‘MOUSE_VID’
  138 |     mouse_fd = find_hidraw_device("mouse", MOUSE_VID, MOUSE_PID);
      |                                            ^~~~~~~~~
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
/home/commander/pi400kb/pi400.c:138:44: note: in expansion of macro ‘MOUSE_VID’
  138 |     mouse_fd = find_hidraw_device("mouse", MOUSE_VID, MOUSE_PID);
      |                                            ^~~~~~~~~
make[2]: *** [CMakeFiles/pi400kb.dir/build.make:76: CMakeFiles/pi400kb.dir/pi400.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 29%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg_common_libconfig.c.o
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/pi400kb.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

   commander@B-400X  /pi400kb/build   main  : sudo cp pi400kb /usr/local/bin/

cp: cannot stat 'pi400kb': No such file or directory

   commander@B-400X  /pi400kb/build   main  : sudo cp pi400 /usr/local/bin/

cp: cannot stat 'pi400': No such file or directory



You did not put a space between the 2 -DMOUSE’s.

-DMOUSE_VID=0x1d57 -DMOUSE_PID=0x130f

Start over with deleting the files in the build directory.

cmake .. -DMOUSE_DEV=/dev/input/by-id/usb-Xenta_2.4Ghz_wireless_optical_mouse_receiver-event-mouse -DMOUSE_VID=0x1d57 -DMOUSE_PID=0x130f

make -j4
sudo cp pi400kb /usr/bin/

1 Like

It still won’t recognize/grab the mouse
I Got:

 commander@B-400X  /pi400kb/build   main  : cmake .. -DMOUSE_DEV=/dev/input/by-id/usb-Xenta_2.4Ghz_wirless_optical_mouse_receiver-event-mouse -DMOUSE_VID=0x1d57 -DMOUSE_PID=0x130f
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/commander/pi400kb/build
 commander@B-400X  /pi400kb/build   main  : make -j4
[ 11%] Building C object CMakeFiles/pi400kb.dir/pi400.c.o
[ 11%] Building C object CMakeFiles/pi400kb.dir/gadget-hid.c.o
[ 17%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg.c.o
[ 23%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg_common.c.o
[ 29%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg_common_libconfig.c.o
[ 35%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg_schemes_libconfig.c.o
[ 41%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/usbg_error.c.o
[ 47%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/ether.c.o
[ 52%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/ffs.c.o
[ 58%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/hid.c.o
[ 64%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/loopback.c.o
[ 70%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/midi.c.o
[ 76%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/phonet.c.o
[ 82%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/ms.c.o
[ 88%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/serial.c.o
[ 94%] Building C object CMakeFiles/pi400kb.dir/libusbgx/src/function/uac2.c.o
[100%] Linking C executable pi400kb
[100%] Built target pi400kb
 commander@B-400X  /pi400kb/build   main  : sudo cp pi400kb /usr/bin
 commander@B-400X  /pi400kb/build   main  : sudo modprobe libcomposite
 commander@B-400X  /pi400kb/build   main  : sudo pi400kb
Found keyboard at: /dev/hidraw2
Failed to open mouse device
Grabbing Keyboard and/or Mouse
Grabbing: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd
Running...
K:0 0 a 0 0 0 0 0 
K:0 0 0 0 0 0 0 0 
K:0 0 9 0 0 0 0 0 
K:0 0 9 b 0 0 0 0 
K:0 0 b 0 0 0 0 0 
K:0 0 0 0 0 0 0 0 
K:0 0 9 0 0 0 0 0 
K:0 0 0 0 0 0 0 0 
K:1 0 0 0 0 0 0 0 
K:3 0 0 0 0 0 0 0 
K:b 0 0 0 0 0 0 0 
Releasing Keyboard and/or Mouse
Cleanup USB
Segmentation fault

Looking above again it says no such device you have in /dev/input/by-id/. Where did you get that?

Give output of:


ls /dev/input/by-id

Like this?


 commander@B-400X   : ls /dev/input/by-id

Permissions Size User Date Modified Name
lrwxrwxrwx     9 root 26 Oct 16:18  usb-1d57_2.4G_Wireless_Optical_Mouse-event-if00 -> ../event2
lrwxrwxrwx     9 root 26 Oct 16:18  usb-1d57_2.4G_Wireless_Optical_Mouse-event-mouse -> ../event0
lrwxrwxrwx     9 root 26 Oct 16:18  usb-1d57_2.4G_Wireless_Optical_Mouse-if01-event-kbd -> ../event3
lrwxrwxrwx     9 root 26 Oct 16:18  usb-1d57_2.4G_Wireless_Optical_Mouse-mouse -> ../mouse0
lrwxrwxrwx     9 root 26 Oct 16:18  usb-_Raspberry_Pi_Internal_Keyboard-event-if01 -> ../event5
lrwxrwxrwx     9 root 26 Oct 16:18  usb-_Raspberry_Pi_Internal_Keyboard-event-kbd -> ../event4

Start over with deleting the files in the build directory.

cmake .. -DMOUSE_DEV=/dev/input/by-id/usb-Xenta_2.4Ghz_wireless_optical_mouse_receiver-event-mouse -DMOUSE_VID=0x1d57 -DMOUSE_PID=0x130f

So do I just enter the cmake . . to over write the build directory? Or do I have to go in and delete everything in that folder manually, or is there a command for it? (Sorry, kinda new at this -->especially Arch-linux)

Not sure what is going on there it looks like 2 keyboards and mice; maybe a reboot will take care of that.

Yes clear out the build directory first.

sudo rm -r *

cmake .. -DMOUSE_DEV="/dev/input/by-id/usb-1d57_2.4G_Wireless_Optical_Mouse-event-mouse" -DMOUSE_VID=0x1d57 -DMOUSE_PID=0x130f
make -j4
sudo cp pi400kb /usr/bin/

Reboot

sudo modprobe libcomposite
sudo pi400kb

Tried the reboot and It still says: “Failed to open mouse device”

Could it be that maybe my mouse isn’t compatible?

Thanks once again for your help.

Could be or extra steps may have to be taken with a wireless mouse or may never work with a wireless mouse but I am out of ideas.