Operation not permitted?
SturmB opened this issue · 6 comments
I thought I'd give your program a try, but the install script doesn't appear to want to work. Here's what I've tried and their output:
apaches-iMac:Development apache$ git clone https://github.com/Jorl17/jar2app
Cloning into 'jar2app'...
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 62 (delta 30), reused 62 (delta 30), pack-reused 0
Unpacking objects: 100% (62/62), done.
Checking connectivity... done.
apaches-iMac:Development apache$ cd jar2app
apaches-iMac:jar2app apache$ ls
LICENSE install.sh jar2app_basefiles
LICENSING jar2app uninstall.sh
README.md jar2app.py
apaches-iMac:jar2app apache$ chmod +x install.sh uninstall.sh
apaches-iMac:jar2app apache$ sudo ./install.sh
Password:
mkdir: /usr/bin/jar2app_basefiles: Operation not permitted
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
cp: /usr/bin/jar2app: Operation not permitted
chmod: /usr/bin/jar2app: No such file or directory
Those last few lines are the problem. I don't know what's going on. Any ideas?
Running Mac OS X El Capitan (10.11.6).
Hi. By default the script tries to install to /usr/bin. Since you are on El Capitan you probably have some form of SIP enabled which prevents this.
In the FAQ there is an entry on how to install to the /usr/local/ prefix which I think still has write-access with SIP enabled. Could you perhaps give that a try? I admit the install scripts are flaky, and I haven't really checked them in a while, so do say if there are any more issues.
Wow, that was fast!
Okay, so it seems that the program installed to /usr/local, since I didn't receive any messages (errors or otherwise) after running the sudo ./install.sh /usr/local
command. However, the program does not seem to run.
Depending upon from where I try to run the program, I'll get one of two possible error messages that are similar:
apaches-iMac:local apache$ jar2app ~/Development/ArtDept.jar
-bash: jar2app: command not found
apaches-iMac:local apache$ cd ~/Development/
apaches-iMac:Development apache$ /usr/local/jar2app ArtDept.jar
env: python3: No such file or directory
apaches-iMac:Development apache$
I suppose it might be because Python isn't installed, even though I thought it was. How can I tell and, more importantly, how can I install it in the best way possible?
Yes, you are correct. Firstly, you should add /usr/local/bin to your PATH
so you don't have to prefix the program every time.
Regarding Python3, the best way I can think of installing it is using Homebrew. Grab brew and then brew install python3
. OS X comes pre-packaged with a version of python2, but, as far as I know, not python3. By the way, I'm not sure but I think Homebrew already adds /usr/local/bin to your PATH
.
Okay, I do have Homebrew installed from when I was playing with Ruby earlier this year. However, once again, permission denied errors appear.
apaches-iMac:~ apache$ brew install python3
==> Installing dependencies for python3: sqlite, gdbm, xz
==> Installing python3 dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.12.2.el_capitan.bo
######################################################################## 100.0%
==> Pouring sqlite-3.12.2.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
OS X provides an older sqlite3.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include
==> Summary
🍺 /usr/local/Cellar/sqlite/3.12.2: 10 files, 2.8M
==> Installing python3 dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.11.el_capitan.bottle
######################################################################## 100.0%
==> Pouring gdbm-1.11.el_capitan.bottle.2.tar.gz
🍺 /usr/local/Cellar/gdbm/1.11: 18 files, 486.7K
==> Installing python3 dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.2.el_capitan.bottle.
######################################################################## 100.0%
==> Pouring xz-5.2.2.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.2: 91 files, 1.4M
==> Installing python3
==> Downloading https://homebrew.bintray.com/bottles/python3-3.5.1.el_capitan.bo
######################################################################## 100.0%
==> Pouring python3-3.5.1.el_capitan.bottle.3.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied - /usr/local/Frameworks
Error: Permission denied - /usr/local/Frameworks
apaches-iMac:~ apache$
Since it's a Homebrew problem, I don't expect you to troubleshoot it; Maybe I'll just get an installer from the Python site. And while I'm at it, I'll reference how to add a new directory entry to my PATH environment variable. Yes, I'm still a greenhorn.
Okay, got it all working now.
Started by updating the PATH
by following this guide, then reloading the .bash_profile
.
Then I updated Homebrew, followed by running the various Homebrew cleaning steps found at this Stackoverflow discussion. I was then able to get Python3 installed successfully and now your jar2app program works! Yay!
Thanks for the awesome help!
I'm glad it all worked out! If you have any problems, feel free to open up new issue here :)