Pivariety driver installation over SSH: 404 on shell script and permission denied

Hi, I’m trying to set up an IMX519 camera module on a Raspberry Pi Zero and I’m stuck on the driver installation. I’m doing everything over SSH.

When I try to pull the shell scripts down, I get:

error 404: not found
unable to resolve host address ‘2 driver’

And when I try to run the installer I already have, it just says:

-bash: ./install_pivariety_pkgs.sh: permission denied

The exact command I ran was:

./install_pivariety_pkgs.sh -p libcamera_dev

Not sure if I downloaded the wrong script or if something on the Pi is broken. Any ideas?

Thanks for the details. A couple of things stand out here.

The “permission denied” on ./install_pivariety_pkgs.sh almost always means the script isn’t marked executable, or you’re running it as a user that doesn’t have rights to execute it in that location. Can you check a few things for me?

  1. Where is the script located, and what do the permissions look like?

ls -l install_pivariety_pkgs.sh

  1. What user are you logged in as over SSH?

whoami

  1. Have you tried running it with sudo?

sudo ./install_pivariety_pkgs.sh -p libcamera_dev

Also, the “unable to resolve host address ‘2 driver’” message looks like a typo/quoting problem in your download command rather than a network issue — it’s treating part of your argument as a hostname. Can you paste the exact command you used to download the scripts?

Here’s what I get:

pi@raspberrypi:~ $ whoami
pi

pi@raspberrypi:~ $ ls -l install_pivariety_pkgs.sh
-rw-r–r-- 1 pi pi 1034 Nov 8 14:22 install_pivariety_pkgs.sh

So it’s not executable I guess? I didn’t realize that mattered.

For the download, I was just following the guide, I think I typed something like:

wget … 2 driver…

Actually I might have copy-pasted and a space got in there. That would explain the ‘2 driver’ thing?

Okay small update. I did chmod +x on it and tried again, but I’m STILL getting permission denied when I run ./install_pivariety_pkgs.sh -p libcamera_dev

Weird because now the file shows as executable:

-rwxr-xr-x 1 pi pi 1034 Nov 8 14:22 install_pivariety_pkgs.sh

Not sure what else it wants from me.

Good, that confirms the file itself is fine now. If it’s executable and you still get “permission denied”, that points to the user context rather than the file.

Two possibilities:

  1. The directory the script lives in isn’t accessible/writable by your user, so the script can’t do what it needs (the installer needs to write to system locations).
  2. The script is being invoked in a context that can’t actually run it even though the bit is set — e.g. it’s on a mounted filesystem with noexec, or the surrounding operations all need root.

Let’s test the simplest path first. Run it with sudo and tell me exactly what happens:

sudo ./install_pivariety_pkgs.sh -p libcamera_dev

Also, is the script sitting in your home directory (/home/pi) or somewhere else? And can you run:

mount | grep home

just to rule out a noexec mount.

So with sudo it got further! It actually started doing things instead of just failing immediately. It ran for a bit and installed some packages.

mount output looked normal, nothing weird about home.

I think sudo was the missing piece. Should I have been using sudo the whole time? The guide didn’t really say clearly.

Yeah, that’s the key takeaway here — the driver install needs root. Normal user commands are fine for everyday stuff, but anything that writes into the system (libcamera, kernel modules, driver packages) has to run with sudo, otherwise you’ll keep hitting “permission denied” exactly like you did.

So to summarize where we landed:

  • The “unable to resolve host address ‘2 driver’” and the 404 were from a malformed download command — a stray space in the URL, not a real network/DNS problem. Redownload carefully with the correct single URL.
  • The “permission denied” on ./install_pivariety_pkgs.sh was a privilege issue, not a broken file. Once the file was executable AND you ran it with sudo, the install proceeded.

Recommended path from here:

  1. Reboot the Pi (sudo reboot).
  2. After it comes back, re-run all the install steps with sudo, e.g. sudo ./install_pivariety_pkgs.sh -p libcamera_dev.
  3. Then do the libcamera/libcamera-apps steps the same way, with sudo.

If anything still fails after the reboot, paste the output here and we’ll dig in further. But the sudo + reboot combo should sort out what you were seeing.