After upgrade to OSX 10.8.2 "latex: command not found" - macos

I've been using the vim-latex suite on my mac (10.7.?) for months with no problem. Over the weekend, I upgraded the OS to 10.8.2, and now my tex files fail to compile. The compile command
\ll
produces no errors within vim, but no pdf-file gets produced. If I drop to the command line in a terminal, the following command
latex document.tex
produces
-bash: latex: command not found
Similarly, for pdflatex. I'm not sure if this is a path error, or if latex for 10.8.2 needs to be reinstalled. I'm not sure how to proceed in either case.

I had the same problem and typing:
export PATH=/usr/texbin:$PATH
seems to work fine in a shell. Although it no longer works if I open a new shell, this is a faster solution to re-downloading and re-installing the huge MacTeX program.

This happened to me after upgrading to OS X El Capitan. I found the latex executables in /usr/local/texlive/2014/bin/x86_64-darwin. So, I just added this to my .bashrc
export PATH="$PATH:/usr/local/texlive/2014/bin/x86_64-darwin"
No need to reinstall.

On OS X, the standard way for third party installers to add a directory to the path is to put a file under /etc/paths.d. TeXLive does this as part of the installation, but the OS upgrade probably blew it away.
You should be able to just create a new file under that directory containing just one line, the path the directory containing the TeX executables.

When setting the path via #petew's answer, /usr/local/texlive/2014/bin/x86_64-darwin may not be the correct version. On my system /usr/local/texlive/2021/bin/universal-darwin was what was needed. Make sure to check your texlive binaries to see what file you downloaded.

Related

Any way to stop Xcode from generating folders like this?

I was trying to build GMP on OS X, and it fails with the following error:
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup: No such file or directory
The problem is due to this command:
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/SMSandboxTools-tmp/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Someone isn't parsing the directory name properly. Does anyone know how to prevent Xcode from generating folders with spaces in the names?
You can't prevent Clean at Startup from being generated.
Your build script could either escape the spaces, or simply put the whole path in quotes. For example, this doesn't work:
$ cd /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup
But this does:
$ cd "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup"
If you don't want to fix the script yourself, I would just open an issue with the GMP developers.
My installation was botched. (Cleanup at Startup sounds an awful lot like something the OS leaves around for dealing with after an update... and I did have an update with issues.) I'm guessing Apple's developers have encountered this before, as the Xcode manual for the command line tools has the following:
The Command Line Developer tools package has been updated to include xcrun. xcrun adds support for the following:
1. The --show-sdk-path option queries SDK paths
Invoking xcrun --show-sdk-path gave the nasty, ugly path with Cleanup at Startup. On the same help page is this:
On OS X Mavericks, xcode-select provides the --reset flag to revert to using the default search paths.
I invoked xcode-select --reset, and that fixed my problem! GMP built smoothly, and xcrun --show-sdk-path now displays nothing... which seems weird, except that, as I say, gmp ran, tested 100% correct, and installed.

Configuring cabal on Max OS X 10.9

When I run cabal install Cabal cabal-install I have this warning:
Warning: The directory
/Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.18.0.2/bin
is not in the system search path.
Looks like something misconfigured, because I saw similar message when I've installed happy, but it pointed to /Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/happy....
How should I configure cabal on OS X 10.9.1, I mean PATH and etc.
Open your ~/.bash_profile with any editor you're comfortable with
Append this to the file: export PATH="$HOME/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0/bin:$PATH"
Save file and close editor
In terminal type source ~/.bash_profile
Then to test, in Terminal type which cabal, and you should see it pointing to the new path.
After few attempts to solve prior issue with OS X Mavericks I've reinstalled entire platform with Homebrew, and issue dismissed. If you need help with that see mentioned answer.

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