old software compatibility with el capitan - macos

I have the next problem. I have a .pkg installation package which is quite all, at least older than El Capitan OS. The problem is (after looking on the internet) this .pkg writes some binaries to /usr/bin and that is something not permited in El Capitan OS anymore, it should be written to /usr/local/bin.
I have found two solutions on the internet (well actually three) which are:
-disabling SIP, which is not recomended.
-waiting for someone to redoo the .pkg (i do not want to wait)
-i was thinking in some simbolik link between /usr/bin and /usr/local/bin so when it tries to write to /usr/bin it really writes to /usr/local/bin
-Redoo the .pkg (no idea at all).
Thank for the answers.

You could use a tool like Pacifist to extract the files out of the pkg and copy them into /usr/local/bin yourself. Pacifist will also let you extract any preflight/postflight scripts that the pkg runs so you can run the equivalent setup commands yourself.

Related

Problems installing Haskell on Yosemite (specifically the gloss library)

I have spent an evening until some ridiculous time in the morning trying to figure out how to get Haskell's GHC to work correctly and to have Cabal install the gloss library.
After reading through every bit of documentation/error reports imaginable, even with old installs of ghc, gcc binary (instead of a symlink to clang), and brewing llvm no matter what happened one fix resolved one issue, only to then present another.
So I have a simple solution that worked for me for Yosemite and I will post it below (I wish someone else had posted it here)
Ok here is the easy solution to the headache:
Go here http://ghcformacosx.github.io/ and download the app and put it in the app directory and run it.
Add the stuff to the .bash_profile (you will see what I mean when you run it)
Run brew install llvm34 (note there was an issue with using a newer version)
Then symlink to llvm so that ghc can find it (I tried editing the ghc settings file but it didn't help. Maybe after all the stuffing around, it was the wrong version of ghc that I was editing)
Brew gave me symlinks at /user/local/bin to llvm BUT NOTE they were not called plain old llc & opt as ghc was looking for.. they were called llc-3.4 & opt-3.4, hence why it couldn't find them. Again their location can be specified in the ghc settings file, but as I had some issues with that I just created some more symlinks.
I went to /usr/bin and ran:
sudo ln -s /usr/local/bin/opt-3.4 opt
sudo ln -s /usr/local/bin/llc-3.4 llc
Which created the generic opt, generic llc that symlinked to the brew installion of the associated v3.4.2 llvm files.
Hope that saves someone an evening.

namei command in MacOs

It may be trivial question, but I'm looking over the internet and SO about namei in macos. I can't find it on Yosemite, also homebrew doesn't contains such package to install. From what I was searching, MacPorts doesn't have it neither. Could some pro developers from MacOs help me or suggest other command that will be able to check for ownership and permissions on a path?
I'm writing this as an answer vs. a comment although I will make a comment first and that is, this doesn't appear to be a question suited to this forum and you might want to ask elsewhere, e.g. Super User.
That said, namei is a part of the util-linux package and as such is not a command normally found under OS X. If it's even possible, you have to download the source code for util-linux and then selectively compile namei and then manually install namei by itself as you would not want to compile and install the entire util-linux package under OS X. I've done similar under OS X with individual utilities of the GNU Core Utilities package however not with the util-linux package.

Uninstalling OSX-AVR from Mac OS X 10.7.2

Does anyone know how to completely remove OSX-AVR from Mac OS X? I need newer support for avr-gcc, so I am going to install CrossPack for AVR, but I do not want any collisions from having multiple avr-gccs in my system. I have not found any documentation about uninstalling OSX-AVR, so I do not know how to get rid of everything.
Thanks,
Took me a while to find this but sometimes you have to install to uninstall, from the readme that popups after you install (located locally at /usr/local/CrossPack-AVR/manual/installation.html):
sudo /usr/local/CrossPack-AVR/uninstall
Have you checked whether there is a bom file for this installation. It might be in /Library/Receipts or ~/Library/Receipts. This file (you can view its content with lsbom) contains a list of all files belonging to an installation.
But I'm not sure whether OSX-AVR writes one.
The which command will tell you in what directory your program is installed, and then you can move that file into the trash.
sudo mv `which <yourProgramName>` ~/.Trash/
I used this to uninstall AVRDUDE from my crosspack installation and it worked fine. Someone has commented that this will not get rid of any extra files that may have been installed in other directories which is true but hopefully those files would be overwritten upon reinstall. This worked fine in my case.
brew remove avrdude worked for me (mac os x 10.11.4).

'make' command missing from OS X

The make command is missing on my mac, running OS X version 10.6 (Snow Leopard). What should I do to install make?
You'll need to install the OS X developer tools from the Mac OS X installation discs.
EDIT: Directions here.
You need to install XCode, which comes along with make. You can download the latest XCode for free (if you're on Lion or Mountain Lion) from the Mac App store.
Update
It seems the link in the selected answer is a better solution, in that you don't have to add it to your path, it installs it in /usr/bin. I was originally thrown off by this as the answer mentions installation disks, which do not exist anymore (and are not needed here).
Original Post
make went missing on my installation of OSX Lion, even with XCode installed.
What I discovered was that, it was not in /usr/bin, but was in /Developer/usr/bin, which is not in $PATH environment variable by default. This is most likely a result of the XCode install.
You have a few options:
install it to one of the directories that is in your path
make a symbolic link to point to the Developer bin directory (for example, from /usr/bin)
modify your path to include the Developer directory (what I did) - see below
Add the developer bin to your path:
Somewhere in ~/.bashrc place the following code:
export PATH=$PATH:/Developer/usr/bin
#Remove Duplicates:
PATH=`perl -e '#A=split(/:/,$ENV{PATH});%H=map {$A[$#A-$_]=>$#A-$_} (0..$#A);#A=join(":",sort{$H{$a} <=> $H{$b} }keys %H);print "#A"'`
export PATH
Line 1: add /Developer/usr/bin to the end of the current path so it has low priority
Line 3: because we're adjusting path, we want to remove duplicates (in case you source more than once). Duplicates aren't really problematic, but this should cause the same directory to not be searched more than once, which may make it faster.
Line 4: Make it available to your environment
Note:
If you're using a different shell (for instance csh), you'll have to adjust the script above and make the changes in that corresponding resource file (~/.cshrc).
To apply changes you'll have to source ~/.bashrc or reopen your terminal.

How can I upgrade the *console* version of vim on OS X?

I'm sure this is a newbie question, but every time I've compiled/dl'ed a new version of vim for os x, running vim on the command-line opens up the gvim app. I just want to upgrade the console version (so I can, for example, have python compiled in to use omnicomplete).
If I understsood the question correcty, here is another solution: check out http://www.andrewvos.com/2011/07/23/upgrading-vim-on-os-x-with-homebrew/
Really simple, fast, painless. It uses homebrew-alt and you also need to have mercurial installed (it will prompt you if not).
You can also use MacPorts to handle the installation for you. Once you've installed it, run the /opt/local/bin/vim binary. I place this in my PATH before the system binary dirs (although be aware that this may cause problems for cmdline tools that rely on the versions of tools shipped with OS X).
This may sound stupid, but are you copying the vim binary to /usr/bin? by default, the "vim" path is /usr/bin/vim. If you compile from source, you'll likely need to either copy the vim binary to /usr/bin/vim (thus overwriting the original vim), or launch the compiled version via absolute path (eg. ~/vim-checkout/build/vim).
that's just a guess, however. I can't see it being anything more than that.
With Homebrew:
brew install macvim
ln -s /usr/local/bin/mvim /usr/local/bin/vim
Can also symlink your new binary to /usr/local/bin/

Resources