cpm
cpm copied to clipboard
Install fail
UPDATE: This appears to only work when executed from git repo's root folder, otherwise I get the Java error below.
~/cpm$ cpm # Works ~/cpm$ cpm install dojo ~/cpm$ cd dojo ~/cpm/dojo$ cpm # FAIL. ~/cpm/dojo$ cd ../../ ~/$ cpm #FAIL
See CLI dump below.
OS: OSX Lion
$ curl https://raw.github.com/kriszyp/cpm/master/install | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 425 100 425 0 0 484 0 --:--:-- --:--:-- --:--:-- 741 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 120 100 120 0 0 103 0 0:00:01 0:00:01 --:--:-- 259 100 973k 100 973k 0 0 74302 0 0:00:13 0:00:13 --:--:-- 56941 mv: rename kriszyp-cpm-5ca6ddb/ to /usr/local/lib/cpm: Permission denied sed: 1: "/usr/local/lib/cpm/cpm": extra characters at the end of l command ln: /usr/local/bin/cpm: Permission denied chmod: /usr/local/bin/cpm: No such file or directory
$ sudo curl https://raw.github.com/kriszyp/cpm/master/install | sh Password: Sorry, try again. Password: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 425 100 425 0 0 525 0 --:--:-- --:--:-- --:--:-- 919 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 120 100 120 0 0 184 0 --:--:-- --:--:-- --:--:-- 236 100 973k 100 973k 0 0 27929 0 0:00:35 0:00:35 --:--:-- 146k mv: rename kriszyp-cpm-5ca6ddb/ to /usr/local/lib/cpm: Permission denied sed: 1: "/usr/local/lib/cpm/cpm": extra characters at the end of l command ln: /usr/local/bin/cpm: Permission denied chmod: /usr/local/bin/cpm: No such file or directory
$ sudo curl https://raw.github.com/kriszyp/cpm/master/install | sudo sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 425 100 425 0 0 729 0 --:--:-- --:--:-- --:--:-- 898 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 120 100 120 0 0 192 0 --:--:-- --:--:-- --:--:-- 248 100 973k 100 973k 0 0 203k 0 0:00:04 0:00:04 --:--:-- 296k sed: 1: "/usr/local/lib/cpm/cpm": extra characters at the end of l command
$ cpm install dojo Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/javascript/tools/shell/Main Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.tools.shell.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Cheers, Adam Crabtree
Same:
MBA:~ rpflo$ curl https://raw.github.com/kriszyp/cpm/master/install | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 425 100 425 0 0 695 0 --:--:-- --:--:-- --:--:-- 965
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 973k 100 973k 0 0 184k 0 0:00:05 0:00:05 --:--:-- 232k
sed: 1: "/usr/local/lib/cpm/cpm": extra characters at the end of l command
I got the same error on install
I checked in a fix for ignoring certificate errors on curl, and Bryan's pull fixes some issues with permissions. Do these fixes fix this issue?
The main problem here seems to be that fact that this install script creates a link from /usr/local/bin/cpm or ~/bin/cpm to the CPM's cpm script and Mac OS simply can't determine the target directory in the script because OSX doesn't have a reliable "readlink -f $0". I am not a scripting expert, I don't how we can automate the install to automatically determine the location of the jars and lib folder to startup CPM. Suggestions welcome.
Does not work for me either
curl https://raw.github.com/kriszyp/cpm/master/install | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 836 100 836 0 0 352 0 0:00:02 0:00:02 --:--:-- 465 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 120 100 120 0 0 61 0 0:00:01 0:00:01 --:--:-- 72 100 975k 100 975k 0 0 72825 0 0:00:13 0:00:13 --:--:-- 110k
Then any cpm command results in same:
cpm
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/javascript/tools/shell/Main
Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.tools.shell.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
I got this error on my mac os lion: Joes-MacBookAir:~ xxx$ sudo curl https://raw.github.com/kriszyp/cpm/master/install | sh Password: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 836 100 836 0 0 189 0 0:00:04 0:00:04 --:--:-- 487 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 975k 100 975k 0 0 29065 0 0:00:34 0:00:34 --:--:-- 183k mv: rename archive to /usr/local/lib/cpm: No such file or directory chmod: /usr/local/lib/cpm/cpm: No such file or directory ln: /usr/local/bin/cpm: No such file or directory
to avoid the readlink error, you can set the CPM_PATH
environment variable and avoid the call to readlink
Setting CPM_PATH makes this work for me on Lion:
CPM_PATH=/usr/local/lib/cpm cpm install dgrid
I also following the advice at https://github.com/kriszyp/cpm/issues/11
btw, you need to point CPM_PATH
to the lib dir. based on the default install CPM_PATH=/usr/local/lib/cpm
I removed the -f flag on the readlink, which seems to fix this latter issue.