Gzip: stdin: invalid compressed data -- format violated


New install, was running 4.9 kernel but dropped to 4.4 after reading a topic on here. When I run the second command, I get this error. Any idea what might be going on? @rsiegel


Hi @kurt.brinker, welcome to the Cayenne Community.

That error looks to me like one of those .gz files may have been corrupt on your system and the unzip utility wasn’t able to unzip it. Have you tried running the install again? I just ran a sanity check install on a test Pi and it unzipped all of these OK, so I don’t think the problem exists in a file on our server. I’m hoping a new install (and thus a re-download of those files) is enough to correct this error.


I flashed a new microsd card with the latest Raspbian image, updated it and then downgraded the kernel to 4.4.
I deleted my previous Pi instance in Cayenne and then added a new one which generated a new ID. I ran the commands and while the first one completed like normal, the second command gave me the same error.
continuing as new install…
–2017-05-14 18:00:18-- http://updates.mydevices.com/raspberry/myDevices-1.0.tar.gz
Resolving updates.mydevices.com (updates.mydevices.com)…
Connecting to updates.mydevices.com (updates.mydevices.com)||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 9247824 (8.8M) [application/x-gzip]
Saving to: ‘/home/pi/myDevices-1.0.tar.gz’

/home/pi/myDevices- 99%[====================> ] 8.81M 371KB/s in 36s

2017-05-14 18:00:56 (248 KB/s) - Connection closed at byte 9233422. Retrying.

–2017-05-14 18:00:57-- (try: 2) http://updates.mydevices.com/raspberry/myDevices-1.0.tar.gz
Connecting to updates.mydevices.com (updates.mydevices.com)||:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 9247824 (8.8M), 14402 (14K) remaining [application/x-gzip]
Saving to: ‘/home/pi/myDevices-1.0.tar.gz’

/home/pi/myDevices- 100%[+++++++++++++++++++++>] 8.82M --.-KB/s in 0.04s

2017-05-14 18:00:57 (331 KB/s) - ‘/home/pi/myDevices-1.0.tar.gz’ saved [9247824/9247824]


Does your download complete if you click this link?


I was able to download the file from that link. Are you behind a firewall that does real-time antivirus/malware scanning? I’ve had quite a few problems with corrupt downloads with these devices (not related to Cayenne) particularly the Cisco Meraki MX64 devices.


Not that I am aware of. However I turned on my VPN and was able to complete the download on my main machine, whereas I had gotten a failure before.

Trying to use winscp to push that to the pi now but its telling me permission denied
Gonna google it.


@rsiegel @adam
If I can download the “myDevices-1.0.tar.gz” from another machine, is there a way to manually run that on the pi?


Yeah, if you can get that file on the target machine, it shouldn’t be a problem to run it in this fashion.

First unzip the myDevices-1.0.tar.gz file with

tar -xvzf myDevices-1.0.tar.gz

This will create a folder titled myDevices-1.0. You need to be in this folder to run the install this way, so:

cd myDevices-1.0

Finally, you’ll need to run the installer specifying the invite code that is unique to you your account, with

sudo bash setup.sh -code YourInviteCode -v

where YourInviteCode is the letters and numbers after the underscore in the installer stub we provide you. So for example, if my stub installer is rpi_zcbxejx5ps.sh then my invite code is zcbxejx5ps.


@rsiegel @adam
That did it!
So apparently my download was being interrupted and when it attempted to resume the download, it was getting corrupted. I was able to download the package on a separate machine, push it to the Pi desktop with WinSCP and then followed the instructions above. Thanks for the help.



I just wanted to bump this thread to note that we’ve now updated our Pi agent to support the 4.9 kernel (it still supports 4.4 as well). The update was automatic in the background so there is nothing you need to do on your end. Feel free to use rpi-update to move forward to the 4.9 kernel at this point if you’d like!