[Solved] sam init error on RPI

#2

Where are you trying to install Snips? It says systemctl does not exist so it’s surely not on a linux device?

0 Likes

#3

I’m trying to install Snips on a Raspberry Pi. I did notice that error, so I made sure that the Pi has systemctl. Or perhaps you mean where am I trying to install Snips from? That is an Ubuntu Virtualbox.

0 Likes

#4

Tonight I tried making sure that the host system (the one I was installing from) had systemctl. It does. Not that I really expected it to matter. I also saw that there was an update to sam, so I updated that. But I’m still getting the exact same error message.

0 Likes

#5

Did you install sam on the raspberry?? It’s not meant that way. Sam is to be installed on a third party machine to control your snips units

0 Likes

#6

what do you mean by installing Sam on a third machine. For my part I installed Sam on a Pi3 directly but against I did not manage to do it on the Pi Zero to make a satellite because recent versions of Nodejs does not work on the pi zéro to install Sam

0 Likes

#7

No, I did not install SAM on the Raspberry Pi. I installed SAM on an Ubuntu virtual machine and I have been trying to use it to set up Snips on the Raspberry Pi. I am following the Quick Start instructions, but I cannot get sam init to complete successfully.

0 Likes

#8

I managed to install Sam directly on pi3 with the latest version of NodeJS by cons PiZero only a version too old for SAM. On the other hand I had understood that you had managed the installation of SAM with a virtual machine Visibly it is not the case
in any case Snips is a really interesting project

0 Likes

#9

I also installed Ubuntu on virtual machine. Before installing SAM make sure you have latest version of NodeJS. After installing SAM, first connect your RPi using cmd sam connect your IP address of Pi and then run sudo sam init
d

0 Likes

#10

Thanks for telling me that you were able to get it working using a similar set up. Maybe the problem is my version of NodeJS. How did you install it? Through apt-get?

0 Likes

#11

No, I haven’t been able to get it installed yet. How did you do it directly? Did you just install NodeJS, then SAM, and then just run the connect any commands from the console on the the console on the Raspberry Pi 3?

0 Likes

#12

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs
and then check it using
node -v and npm -v
Please let me know if you are able to fix that

0 Likes

#13

Thanks! I will try this. Do you mind posting your version numbers so I can compare?

0 Likes

#14

image

Do not use 11.x version

0 Likes

#15

Are you able to installed NodeJS and run sam init.

0 Likes

#16

I’m trying to do it now. I had some 12.0 version through Ubuntu Software.

0 Likes

#17

Yes, I removed the 12.x version of NodeJS that I had installed through the Ubuntu Software center and followed ruchir’s instructions for getting 10.x. My version of npm was older (6.4), but now sam init succeeds. Thank you!

0 Likes

#18

Welcome !! thanks for letting me know

0 Likes

#19

I try to do this on a piZero…
That don’t work because I can’ Use recent version of NodeJS…

0 Likes

#20

Use this on Pi
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
. ~/.bashrc
nvm install 8.6

Then update the npm
sudo npm i -g npm

0 Likes

#21

Thank you for the help!

0 Likes