Unable to launch VLC installer

I have put together the Pirate Radio and is now trying to get the VLC radio to work.

My first try was to follow the tutorial and everything went fine until it was time to launch the one-line installer.
It downloaded the packages (I think) and maybe doing some other stuff, but after the “Checking envirorment…” appears I got a message similar to this: We can´t connect to the Internet (or network). Check your network connection.
Fine, I double checked the networks settings and they seems ok. Tried again a few times (including a few reboots) but got the same message.

Next attempts was to reinstall, and now I picked the regular Rasbian version to have the GUI to help me.
Network settings once again looked ok and I was able to visit Google search page through Chromium.
Tried the same one-line installer command and had the same result. Same message appeared.
I then tried the mopidy installer and that worked, no error message and the setup went smootly.

What´s gone wrong? Is the one-time installer script offline?
The line I used is: “curl https://get.pimoroni.com/vlcradio | bash”

It’s possible something in your network config (not necessarily on the Pi, but your router or otherwise) is blocking package install. Our install script relies on the package management features available on the Pi, and any problems those have with networking will break out installer too.

Try running these commands manually to see what happens:

sudo apt update
sudo apt upgrade

The first command found three upgradable packages, second one upgraded them.
No issues at all.

I reinstalled Jessie Lite for a third attempt and it didn´t work. The Spotify installer seemed to work better first, but has issue too. Most of the packages are installed, but Mopidy doesn´t run at at startup. Manually starting give me a line in the the command log saying “No module named Spotipy”.

How do I find out if my router is the problem? What should I look for in the router admin menu?
I have a Netgear R6220 router if that helps.

Ah it looks like it’s failing at the check_network step, this has come up before because a user had (Google’s DNS) blocked for some reason.

The offending code looks like this:

check_network() {
    sudo ping -q -w 10 -c 1 | grep "received, 0" &> /dev/null && return 0 || return 1

What do you see if you run: sudo ping -q -w 10 -c 1

I get this;

PING ( 56(84) bytes of data.

— ping statistics—
1 packets trasnmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 19.501/19.501/19.501/0.00 ms

Well that’s curious! From that output the check_network call should be working. Although the code looks like it would fail if there was >= 1% packet loss (assuming fractions of a percent are displayed as 0.1% etc). But then that still doesn’t really explain why the failure was repeatable. If you run the ping time a few times, do you experience any packet loss or failures?

Sorry to put you through the debug wringer, but this is a bit of a tricky one! You’re only the second person (as far as I know) to ever have a problem with the network check.

1 Like

I tried a few time to ping, but it looked ok. No packet losses.

I was curious too see how the installer script(s) looked liked and found a difference between the VLC radio script and the phat beat/spotipy in the check network section.

In VLC radio script it looks like this:

check_network() {
sudo ping -q -w 1 -c 1 ip r | grep default | cut -d ' ' -f 3 | head -n 1 &> /dev/null && return 0 || return 1

…but in the phat beat/spotipy script it looks like this:

check_network() {
sudo ping -q -w 10 -c 1 | grep “received, 0” &> /dev/null && return 0 || return 1

I don´t know exactly how this stuff works, but could it be so that the installer script doesn´t work since the adress where it y´should try to ping isn´t written out? Or does the VLC script get that data from somewhere else within the script?

That’s some good sleuthing. It looks like the VLC radio script might be running an earlier (or perhaps newer) version of the script. I checked the VLC radio command and it, indeed, fails spectacularly for me. This is weird, because I’m pretty certain I used exactly this script to install VLC radio on my Stretch setup for testing recently.

Looks like I’ve got a bit of detective work to do.

Is it possible to do a workaround to solve/bypass this?
Doing the installation the manual way might work to, but I´m not sure what I need and how to install it.

You could download the install script, tweak out the internet connectivity check and run it locally. Either use wget to grab it, or curl get.pimoroni.com/vlcradio > vlcradio.sh


check_network() {
    sudo ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3 | head -n 1` &> /dev/null && return 0 || return 1


check_network() {
    return 0

Tweaking the script is easy, it´s the next step that is a bit more tricky.
I assume that it needs to be in a folder on the sd-card to work, but I can probably not access it from windows.