Found out about pow just now and trying to install it on a laptop with a 32bit processor. I am running into (hopefully) a minor error.
During the installation from source I get the following error:
*** Installing local configuration files...
mkdir: /Users/username/Library/Application Support: Permission denied
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Command failed: mkdir: /Users/username/Library/Application Support: Permission denied
at ChildProcess.exithandler (child_process.js:102:15)
at ChildProcess.emit (events.js:67:17)
at Socket.<anonymous> (child_process.js:172:12)
at Socket.emit (events.js:64:17)
at Array.<anonymous> (net.js:837:12)
at EventEmitter._tickCallback (node.js:126:26)
pow#0.3.2 /usr/local/lib/node_modules/pow
├── log#1.2.0
├── async#0.1.8
├── coffee-script#1.1.2
├── nack#0.13.1 (netstring#0.2.0)
└── connect#1.7.1
I have tried to change the permissions on the application support folder using:
sudo chmod 777 ~/Library/Application\ Support/
and can verify the permissions using:
ls -la ~/Library/ | less
I get the following:
drwxrwxrwx+ 15 username blah 510 26 Sep 19:16 Application Support
Can anyone point me in the right direction as I seem to have hit a brick wall thanks
From completly unrelated git issue:
sudo chown -R $USER /usr/local/
& then run install without sudo
npm -g install
Worked for me...
Related
I'm trying to make a brew formula work. It installs a python script with 2 dependencies on common libraries including psycopg2. The .tar.gz contains a working setup.py.
My .rb Formula is as follows:
class Asdf < Formula
include Language::Python::Virtualenv
homepage "https://my-homepage"
url "https://github.com/asdf/asdf/raw/master/asdf-1.0.tar.gz"
sha256 "a working sha"
version "1.0"
depends_on "python#2"
depends_on "postgresql"
bottle :unneeded
resource "redacted"
(etc)
resource "psycopg2" do
url "https://files.pythonhosted.org/packages/c0/07/93573b97ed61b6fb907c8439bf58f09957564cf7c39612cef36c547e68c6/psycopg2-2.7.6.1.tar.gz"
sha256 "27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82"
end
def install
virtualenv_install_with_resources
end
test do
system bin/"asdf", "--help"
end
end
I get the log output:
==> Installing asdf from asdf/asdf
==> Downloading https://github.com/asdf/asdf/raw/master/asdf-1.tar.gz
Already downloaded: /Users/asdf/Library/Caches/Homebrew/downloads/sha--asdf-1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/37/db/sha/virtualenv-16.4.3.tar.gz
Already downloaded: /Users/asdf/Library/Caches/Homebrew/downloads/sha--virtualenv-16.4.3.tar.gz
==> python2 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/asdf--homebrew-virtualenv-20190327-8864-er08i7/target --install-scripts=/private/tmp/asdf--homebrew-vi
==> python2 -s /private/tmp/asdf--homebrew-virtualenv-20190327-8864-er08i7/target/bin/virtualenv -p python2 /usr/local/Cellar/asdf/1.0.0/libexec
==> Downloading https://files.pythonhosted.org/packages/c0/07/93573b97ed61b6fb907c8439bf58f09957564cf7c39612cef36c547e68c6/psycopg2-2.7.6.1.tar.gz
Already downloaded: /Users/asdf/Library/Caches/Homebrew/downloads/2e85a2e4c99e7531cc7b15f878ebfe254082386c495a470b63a9711a8bbdafec--psycopg2-2.7.6.1.tar.gz
==> /usr/local/Cellar/asdf/1.0.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/asdf--psycopg2-20190327-8864-hnm0au/psycopg2-2.7.6.1
==> /usr/local/Cellar/asdf/1.0.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/asdf-20190327-1234-1abce
Last 15 lines from /Users/asdf/Library/Logs/Homebrew/asdf/05.pip:
Created temporary directory: /private/tmp/pip-install-PAhyP8
Cleaning up...
Removed build tracker '/private/tmp/pip-req-tracker-JFqLxc'
Directory '/private/tmp/asdf-20190327-1234-1abcde' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Exception information:
Traceback (most recent call last):
File "/usr/local/Cellar/asdf/1.0/libexec/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
status = self.run(options, args)
File "/usr/local/Cellar/asdf/1.0/libexec/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 289, in run
self.name, wheel_cache
File "/usr/local/Cellar/asdf/1.0/libexec/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 269, in populate_requirement_set
wheel_cache=wheel_cache
File "/usr/local/Cellar/asdf/1.0/libexec/lib/python2.7/site-packages/pip/_internal/req/constructors.py", line 248, in install_req_from_line
"nor 'pyproject.toml' found." % name
InstallationError: Directory '/private/tmp/asdf-20190327-1234-1abcde' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/asdf/asdf/issues
There's clearly a working setup.py file contained in the package. I can wget and inspect it.
$ wget https://github.com/asdf/asdf/raw/master/asdf-1.0.tar.gz
(etc etc)
$ tar -ztvf asdf-1.0.tar.gz
-rwxr-xr-x 0 asdf staff 5527 Mar 27 15:01 asdf.py
-rw-r--r-- 0 asdf staff 1825 Mar 27 14:07 README.md
-rw-r--r-- 0 asdf staff 505 Mar 27 15:07 setup.py
And I can't find other references to this error. What could I be doing wrong?
The error was because homebrew expected all files including setup.py to be inside a subfolder called asdf-1/ within the .tar.gz
I'm running into a problem attempting to upload the "blink" app onto the motes. I can't seem to run the command make telosb reinstall bsl,/dev/ttUSB0 or make telosb reinstall while in the apps/Blink directory, which is preventing me from moving on with my project. I've tried as a user, superuser, and as root. I've outlined below the responses from variable commands. [Running Ubuntu 16.04, TinyOS 2.1.2, ncc version 1.4.2, nescc version 1.3.6]
(A)With root and the make telosb command I get back:
mkdir -p build/telosb
compiling BlinkAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"liam-Latitude-E\" -DIDENT_USERHASH=0x9236fe46L -DIDENT_TIMESTAMP=0x59384a62L -DIDENT_UIDHASH=0xdc08609fL BlinkAppC.nc -lm
compiled BlinkAppC to build/telosb/main.exe
2538 bytes in ROM
56 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
writing TOS image
(B)With regular user and the make telosb command I get back:
mkdir -p build/telosb
/bin/sh: 1: cannot create build/telosb/ident_flags.txt: Permission denied
/home/liam/tinyos-main/support/make/ident_flags.extra:13: recipe for target 'ident_cache' failed
make: *** [ident_cache] Error 2
(C)With a super user and the sudo make telosb command I get back:
make: *** No rule to make target 'telosb'. Stop.
(D)With root and the make telosb reinstall command I get back:
cp build/telosb/main.ihex build/telosb/main.ihex.out
found mote on /dev/ttyUSB0 (using bsl,auto)
installing telosb binary using bsl
tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
Traceback (most recent call last):
File "/usr/bin/tos-bsl", line 1918, in <module>
main(0);
File "/usr/bin/tos-bsl", line 1843, in main
speed=speed,
File "/usr/bin/tos-bsl", line 1218, in actionStartBSL
self.actionChangeBaudrate(speed) #change baudrate
File "/usr/bin/tos-bsl", line 1345, in actionChangeBaudrate
self.serialport.setBaudrate(baudrate)
AttributeError: 'Serial' object has no attribute 'setBaudrate'
/home/liam/tinyos-main/support/make/msp/bsl.extra:45: recipe for target 'program' failed
make: *** [program] Error 1
(E)Whereas with a regular user and make telosb reinstall I get back:
cp build/telosb/main.ihex build/telosb/main.ihex.out
cp: cannot create regular file 'build/telosb/main.ihex.out': Permission denied
/home/liam/tinyos-main/support/make/msp/msp.rules:92: recipe for target 'setid' failed
make: *** [setid] Error 1
I have been all over the internet and online forums and haven't found a fix yet. I researched around (D) and found that perhaps python 2 might have changed the name of 'setBaudRate' variable. I'm not sure how to change that either.
Thank you for your time and help!
edit: added ncc and nescc versions.
This stack overflow answer is applicable to TinyOS.
So it turns out that pyserial 3.0.1 is not compatible with the TinyOS app, Blink. I'm fairly certain that pyserial 3.0.1 came with the package for TinyOS. To fix this, use the command sudo pip install "pySerial>=2.0,<=2.99999". For me, it kicked back:
The directory '/home/liam/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/liam/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pySerial<=2.99999,>=2.0
Installing collected packages: pySerial
Found existing installation: pyserial 3.0.1
DEPRECATION: Uninstalling a distutils installed project (pySerial) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling pyserial-3.0.1:
Successfully uninstalled pyserial-3.0.1
Successfully installed pySerial-2.7
But the blink app still uploaded and worked fine.
I try to install the webapp generator from yeoman but I have got this error :
You don't seem to have a generator with the name webapp installed.
after yo webapp :
npm install -g yo (works fine)
npm install -g generator-webapp (works fine)
yo webapp (does not work)
Here is the command lines (on Mac Os) :
MBP-de-Empon:yo Empon$ npm install -g yo
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
/Users/Empon/npm/bin/yo-complete -> /Users/Empon/npm/lib/node_modules/yo/lib/completion/index.js
/Users/Empon/npm/bin/yo -> /Users/Empon/npm/lib/node_modules/yo/lib/cli.js
> yo#1.8.5 postinstall /Users/Empon/npm/lib/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version
Everything looks all right!
/Users/Empon/npm/lib
└── yo#1.8.5
MBP-de-Empon:yo Empon$ npm install -g generator-webapp
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/Users/Empon/npm/lib
└── generator-webapp#2.4.1
MBP-de-Empon:yo Empon$ yo webapp
Error webapp
You don't seem to have a generator with the name webapp installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 14 registered generators run yo with the `--help` option.
MBP-de-Empon:yo Empon$
EDIT :
So yeoman searched at usr/local... and the webapp generator was downloaded at /Users/Empon/...
So I copied the content into a new folder with the same name : generator-webapp:
mkdir generator-webapp
cp -a /Users/Empon/npm/lib/node_modules/generator-webapp/. /usr/local/lib/node_modules/generator-webapp/
I tried again yo webapp, and I have got this error now :
So it looks good until this line :
events.js:141
throw er; // Unhandled 'error' event
and a new line appear on the Terminal and I was not being able to complete the sass options :
MBP-de-Empon:yo Empon$ yo webapp
_-----_ ╭──────────────────────────╮
| | │ 'Allo 'allo! Out of the │
|--(o)--| │ box I include HTML5 │
`---------´ │ Boilerplate, jQuery, and │
( _´U`_ ) │ a gulpfile to build your │
/___A___\ /│ app. │
| ~ | ╰──────────────────────────╯
__'.___.'__
´ ` |° ´ Y `
? Which additional features would you like to include? (Press <space> to select)
❯◉ Sass
◉ Bootstrap
◉ Modernizr
events.js:141
throw er; // Unhandled 'error' event
^
TypeError: this.env.adapter.prompt(...).then is not a function
at Base.prompt (/usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/lib/base.js:240:45)
at module.exports.generators.Base.extend.prompting (/usr/local/lib/node_modules/generator-webapp/app/index.js:102:17)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/lib/base.js:439:23)
at /usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/node_modules/run-async/index.js:25:25
at /usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/node_modules/run-async/index.js:24:19
at /usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/lib/base.js:440:9
at processImmediate [as _immediateCallback] (timers.js:383:17)
MBP-de-Empon:yo Empon$
I recently started building iOS apps using Cordova and I’ve hit a roadblock. After installing nodeJS, git and cordova (with sudo), I created my first app in the Documents folder of my user account.
The first run went perfectly. Everything worked, and adding my dev account to Xcode helped my app to run on the device. I decided I’d spice things up a bit by adding a “before_prepare” hook called 001_c.js in <appName>/hooks/before_prepare folder. This is how the hook begins:
//This is where nodeJS exists
#!/usr/local/bin node
console.log("Changing config");
var fs = require('fs');
var path = require('path');
var rootdir = process.argv[2];
//and so on
When I now build the app, I get this error:
pc295786:master kellster$ cordova build ios Running command:
/Users/kellster/documents/apps/master/hooks/before_prepare/001_c.js
/Users/kellster/documents/apps/master Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1155:11)
at Object.exports.spawn (child_process.js:988:9)
at Object.exports.spawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:104:31)
at runScriptViaChildProcessSpawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:23)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:131:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:114:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
To troubleshoot, I changed the first line of the hook script from
#!/usr/local/bin node
to
#! node
(Because this worked on Windows. node was in global scope). But, this resulted in an ENOENT error:
pc295786:master kellster $ cordova build ios Running command:
/Users/kellster/documents/apps/master/hooks/before_prepare/001_c.js
/Users/kellster/documents/apps/master Error: Hook failed with error
code ENOENT:
/Users/kellster/documents/apps/master/hooks/before_prepare/001_c.js
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:194:23
at _rejected (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:797:24)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:823:30
at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:741:41)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
How do I get this to build? I’d appreciate any suggestions I could try.
Some things to note:
(In my desperation, ) I tried running the following commands, because the "EACCES" type of error. But none of them seemed to have any kind of effect on the result. The build was still failing.
sudo chmod 777 “/Users/kellster/documents/apps/master"
sudo chmod 777 “/usr/local/lib”
sudo chmod 777 "/usr/local/bin/"
chmod 777 "/Users/kellster/documents/apps/master/platforms/"
sudo chmod a+rwx "/Users/kellster/Documents/apps/Master/hooks/before_prepare/001_c.js"
sudo chmod a+rwx "/Users/kellster/Documents/apps/Master/"
sudo chown -R kellster /usr/local/lib/node_modules/cordova
2) Node is installed in
/usr/local/bin
Old answer: #!/usr/local/bin node -> better #!/usr/bin/env node
Updated answer: do not use spaces for referencing node executable instead use:
#!/usr/local/bin/node
Also chmod your script: For example:
chmod 777 hooks/before_prepare/onde.js
where onde.js it is your script. If you're on Mac(my case) or Linux, then your .js must on chmod 777 to avoid EACCES errors.
Getting an error when I try to install dos2unix via homebrew. brew doctor has no suggestions, and other install work like a charm. No idea where to start tracing it.
$ brew install dos2unix
==> Downloading http://waterlan.home.xs4all.nl/dos2unix/dos2unix-6.0.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/dos2unix-6.0.3.tar.gz
==> make prefix=/usr/local/Cellar/dos2unix/6.0.3 CC=cc CPP=cc CFLAGS= CFLAGS_OS=
cc -DVER_REVISION=\"6.0.3\" -DVER_DATE=\"2013-01-25\" -DVER_AUTHOR=\"'Erwin Waterlander'\" -DDEBUG=0 -I/usr/local/Cellar/gettext/0.18.3.1/include -DD2U_UNICODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DENABLE_NLS -DLOCALEDIR=\"/usr/local/Cellar/dos2unix/6.0.3/share/locale\" -DPACKAGE=\"dos2unix\" -c unix2dos.c -o unix2dos.o
pod2text man/man1/dos2unix.pod > man/man1/dos2unix.txt
/bin/sh: /usr/bin/pod2text: Permission denied
make: *** [man/man1/dos2unix.txt] Error 126
make: *** Waiting for unfinished jobs....
On my system /usr/bin/pod2text had no execution rights. After changing that by executing the following command I had no problem installing dos2unix:
sudo chmod +x /usr/bin/pod2text