Error when trying to install Particle on Raspberry Pi

I get errors when running the install script according to the instruction on a Rasperry Pi 2+, result attached below (google translated from swedish). Any tip on how to proceed?

pi@pers-raspberrypi ~ $ bash <(curl -SL https://particle.io/install-pi)
Installing the Agent Particle

Downloading packages

################################################## ###################### 100.0%
################################################## ###################### 100.0%
################################################## ###################### 100.0%
################################################## ###################### 100.0%

Installing packages

Reading package lists ... Done
Building dependency tree
Reading state information ... Done
libssl-dev is already the newest version.
The following packages were automatically installed and are no longer necessary:
  bundler ruby-highline RubyGems integration
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Selects the previously non-selected packets particle agent.
(Reading database ... 86884 files and directories currently installed.)
Extracting particle agent (from ... / particle-agent_0.2.3-1_all.deb) ...
Preparing to replace ruby unicode display width 1.1.1-1 (using ... / ruby-unicode display width_1.1.1-1_all.deb) ...
Unpacking replacement ruby unicode display width ...
Preparing to replace ruby-whirly 0.2.3-1 (using ... / ruby-whirly_0.2.3-1_all.deb) ...
Unpacking replacement ruby-whirly ...
Chooses not previously chosen package ruby-particlerb.
Extracting ruby-particlerb (from ... / ruby-particlerb_1.3.1-1_all.deb) ...
dpkg: dependency problems prevent configuration of particle-agent:
 Particle agent is dependent on the ruby-thor (> = 0:19), but:
  The version of ruby-thor of the system is 0.15.3-1.

dpkg: error processing particle agent (--install):
 dependency problems - leaving unconfigured
Sets ruby unicode display width (1.1.1-1) ...
Sets ruby-whirly (0.2.3-1) ...
dpkg: dependency problems prevent configuration of ruby-particlerb:
 ruby-particlerb depends on ruby-Faraday (> = 0.9.0), but:
  Package ruby-Faraday is not installed.
 ruby-particlerb depends on ruby-Faraday middleware (> = 0.9.0), but:
  Package ruby-Faraday middleware is not installed.

dpkg: error processing ruby-particlerb (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 Particle agent
 ruby-particlerb
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Correction dependencies .... Finished
The following packages were automatically installed and are no longer necessary:
  bundler ruby-highline RubyGems integration
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  Particle agent ruby-particlerb
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 807 kB of additional disk.
(Reading database ... 86944 files and directories currently installed.)
Removes particle-agent ...
Removes ruby-particlerb ...
W: Operation was interrupted before it could finish

Running sudo particle-agent setup

sudo: particle-agent: command not found

Looks like you have some older Ruby packages installed and those don’t get upgraded properly.

Try

sudo apt-get update
sudo apt-get upgrade

to bring your system up to the latest version

Thanks for promt reply! I already had done that. Just rerunned the update to be 100% sure and tried again, same result.

What Linux distro are you running on your Pi?

Im running Raspian wheezy

PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian

Try sudo apt-get dist-upgrade instead of sudo apt-get upgrade. Then try to install Particle.

Tried that, the problems remains no change.

Might have to reimage your Pi. Did you install the OS using NOOBS, or some other method?

Yes, I think Noobs was used, was a time ago since the install.

Gotcha. I’d recommend snagging the newest version of NOOBS and doing a new install. https://www.raspberrypi.org/downloads/noobs/ You’ll have to format the SD card unzip the contents of the zip file onto the SD card then boot up the Pi.

Found this answer http://raspberrypi.stackexchange.com/questions/49565/how-to-install-ruby-2-1-9 about ruby updates on Raspian. Just adding the line “deb http://archive.raspbian.org/raspbian/ stretch main” in etc/apt/sources.list and then
sudo apt-get update, sudo apt-get upgrade and then following the installation instructions almost took me there. The particle agent is running but can’t setup, get the following message

pi@pers-raspberrypi /etc/apt $ sudo particle-agent setup
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': /usr/lib/ruby/vendor_ruby/whirly.rb:114: syntax error, unexpected tPOW, expecting ')' (SyntaxError) def self.configure(**options) ^ /usr/lib/ruby/vendor_ruby/whirly.rb:132: syntax error, unexpected tPOW, expecting ')' def self.start(**options) ^ from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/vendor_ruby/particle_agent/spinner.rb:1:in <top (required)>' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:4:in<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/vendor_ruby/particle_agent/cli.rb:2:in <top (required)>' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /usr/bin/particle-agent:13:in

Any idea how to get around this last? problem?

You ended up with Ruby 1.9, which is an old version. Raspbian comes with Ruby 2.3 so I’m not sure how that happened. I only tested the Particle agent on Ruby 2.3 so far.

Tried hard to get the Ruby updated, but finally gave up and reinstalled jessie light. Now the particle-agent is up and running. Thanks for your help!

2 Likes