Try running these lines from the installer :
sudo curl -fsSLo /usr/local/share/po-common https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-common
sudo curl -fsSLo /usr/local/share/po-linux https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-linux
sudo curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po
sudo chmod +x /usr/local/bin/po
po install
Adam42
May 28, 2018, 12:44am
13
Hi Nrobinson2000
I get an error on the 3rd item in the list.
adam@adam-XPS-13-9370:~$ sudo curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po
curl: (23) Failed writing body (0 != 1917)
And the 4th item. also causes an error.
adam@adam-XPS-13-9370:~$ sudo chmod +x /usr/local/bin/po
chmod: cannot access '/usr/local/bin/po': No such file or directory
Last line, also has an error.
adam@adam-XPS-13-9370:~$ po install
po: command not found
Is there something you can recommend to check its not my machine? I’m running Ubuntu 16.04.
Thank you for your help on this!
It looks like it’s failing to download.
Can you check to make sure the /usr/local/bin
folder exists?
ls /usr/local/bin
Adam42
May 28, 2018, 1:02am
16
It does not exist.
Should I create it?
There is a folder called “sbin” in this location is that useful?
Update: I created /usr/local/bin
the install is working now.
Successfully installed!
However, when I run particle identify
I get the following error.
> adam@adam-XPS-13-9370:~$ particle identify
>
> Your device id is undefined
> Your system firmware version is undefined
1 Like
The electron’s in listening mode right?
Adam42
May 28, 2018, 1:19am
18
Hi nrobinson2000,
Yes, it is in listening mode. But… The software on the device was running SystemThread enabled which can cause problems. See this post. Electron entering listening mode when not able to connect
I put the device into “Safe” Listening mode. Going “Safe Mode” -> “Listening Mode”
After that I re-ran particle identify
and got the information I was looking for.
Thank you @nrobinson2000 and @rickkas7 for your help!
1 Like
I hope you enjoy po-util. It’s got a lot of features.
LesG
May 19, 2019, 11:49pm
22
Hi there, I am running Ubuntu 18.04.2 LTS. I have installed po utils and receive this error when I try to login…
les@les-RV411-RV511-E3511-S3511:~/bin$ particle login
module.js:549
throw err;
^
Error: Cannot find module ‘core-js/modules/es.array.index-of’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/particle-cli/dist/app/cli.js:3:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Can you point out where I’m going wrong please
Have you tried the following commands?
Have you tried this?
sudo npm uninstall -g --unsafe-perm particle-cli
sudo npm install -g --unsafe-perm particle-cli
LesG
May 20, 2019, 1:57am
24
This is after the sudu npm command you sugested
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/particle-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm ERR! path /usr/local/lib/node_modules/particle-cli/dist/index.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/particle-cli/dist/index.js’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/les/.npm/_logs/2019-05-20T01_01_38_067Z-debug.log
les@les-RV411-RV511-E3511-S3511:~$ particle login
bash: /usr/local/bin/particle: No such file or directory
What do you get for node -v
and npm -v
?
I’m getting a different issue on 18.04.1 but it still runs fine.
$ sudo npm install -g --unsafe-perm particle-cli
/usr/bin/particle -> /usr/lib/node_modules/particle-cli/dist/index.js
> usb@https://github.com/particle-iot/node-usb/archive/particle-1.5.0.tar.gz install /usr/lib/node_modules/particle-cli/node_modules/usb
> prebuild-install --tag-prefix particle- --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.2.5
prebuild-install info looking for cached prebuild @ /home/nrobinson/.npm/_prebuilds/33374e-usb-v1.5.0-node-v59-linux-x64.tar.gz
prebuild-install http request GET https://github.com/particle-iot/node-usb/releases/download/particle-1.5.0/usb-v1.5.0-node-v59-linux-x64.tar.gz
prebuild-install http 404 https://github.com/particle-iot/node-usb/releases/download/particle-1.5.0/usb-v1.5.0-node-v59-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=9.11.2 runtime=node arch=x64 libc= platform=linux)
make: Entering directory '/usr/lib/node_modules/particle-cli/node_modules/usb/build'
make: *** No rule to make target 'Release/obj.target/libusb/libusb/libusb/core.o', needed by 'Release/obj.target/usb.a'. Stop.
make: Leaving directory '/usr/lib/node_modules/particle-cli/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.15.0-46-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/particle-cli/node_modules/usb
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/particle-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.5.0 (node_modules/particle-cli/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@https://github.com/particle-iot/node-usb/archive/particle-1.5.0.tar.gz install: `prebuild-install --tag-prefix particle- --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ particle-cli@1.41.0
updated 1 package in 5.694s
For your problem it sounds like it’s complaining about the following file:
/usr/local/lib/node_modules/particle-cli/dist/index.js
Could you see whether it exists or not, and possibly chmod +x
it?
LesG
May 20, 2019, 9:23pm
28
Hi @nrobinson2000 , no particle-cli does not exist in
Sorry can you explain the chmod part
Sorry for the delay.
This seems to fix it for me:
sudo apt install libusb-dev
sudo npm install -g --unsafe-perm particle-cli
Is there an uninstall po
command, or something that will do that?
It installed like GB’s worth of files into folder .po-utils , that are not needed to solve this issue. I guess I can delete that folder, but I would also like to purge the po and /usr/local/bin/ and share/ and whatever else. Is that all that’s needed? Thanks
$ curl -fsSLO https://github.com/nrobinson2000/po/raw/master/depend/60-po-util.rules
$ sudo mv 60-po-util.rules /etc/udev/rules.d/60-po-util.rules
Using these two lines to put this rules file in the udev/rules.d folder and then restarting worked great for me. (for what it’s worth, the particle serial identify
command from the VS CLI would work if I put sudo
in front, so I didn’t have any other issues)
Hey @leka0024 ,
Since this post, I’ve completely reimplemeted po-util in Python and created neopo, a far superior tool.
I would highly recommend switching to neopo. Let me know if you have any questions.
Regarding your question, you can also install the udev rules file with:
particle usb configure
How do I purge the “old” po? It installed easily enough with po install
, so is there an automated uninstall? Or do I just need to delete the three folders from the curl lines and the .po-utils folder, and figure out how to remove the po command? Thanks!