cannot link homebrew emacs - macos

Recently I uninstalled and reinstalled Homebrew entirely on my macbook (OSX 10.9.5) because there was some problem with my Python. Then I reinstalled all the programs in Homebrew and everything worked fine except for Emacs. When I tried to link emacs
$ brew link emacs
Linking /Users/myname/homebrew/Cellar/emacs/24.3... 21 symlinks created
I expected it to create a shortcut in Applications and I open the Emacs GUI from there, but Emacs is not showing up there and I don't know how I can open the GUI. What did I do wrong and how can I link my Emacs?

Try running it from the command line to see what's wrong:
emacs --debug-init
The program is likely not able to find some elc files or something among those lines.
If all fails, try using the master branch (I update my emacs frequently, such as today).
brew install emacs --HEAD --use-git-head --cocoa --srgb --with-xml2 && brew linkapps

Related

How can I install an X11 version of Emacs on MacOS Catalina?

I'd like to install an X11 version of Emacs on Catalina, but haven't found anything online that tells me how I might accomplish this.
The following worked for some previous versions of MacOS, including, I believe Mojave.
$ brew tap d12frosted/homebrew-emacs-plus
$ brew install /emacs-plus --with-x11
Unfortunately, at the moment, if you do this, you get only the "app" version of Emacs, not the X11 version.
The default Emacs recipe that comes with Homebrew does not currently support the "--with-x11" or "--with-x" option.
Is there another Emacs cask somewhere that supports X11?
P.S. I know that I could try to build Emacs directly from the Emacs sources myself, but from past experience, I am afraid that there be dragons along this path.
P.P.S. I seem to have gotten a working version of an X11 emacs installed by rsyncing the directory /usr/local/Cellar/emacs over from a Mac that is running Mojave. But clearly this is less than ideal, so I'm still looking for how I might accomplish this the "right" way.
I maintain my own brew formula for X11 emacs that you may be able to use. I wrote about this in a blog entry here.
This isn't really a programming question -- probably better for serverfault.com or unix.stackexchange.com, but I'll post this reply here anyway.
My last attempts to try to use homebrew to install X11 capable apps, especially Emacs, failed. Once upon a time I had edited the homebrew recipe to make it compile a local version with X11 support, but I was giving up on maintaining that against the quickly moving target of homebrew and the mass migration of homebrew away from supporting X11.
So, really your best option is to build Emacs from source and install it.
(I've moved entirely away from homebrew as a result -- I only use pkgsrc now, and that gives one an easy way to reliably build Emacs with X11 support and manage all the dependencies, etc.)

Skip installation of Command Line Tools when installing Homebrew on macos

I am installing homebrew on macOS High Sierra 10.13. I have already installed the Command Line Tools for Xcode which is a requirement for homebrew. When installation of homebrew starts I am forced to install command line tools (or abort). When I do this the installation process hangs. I don't understand why this hangs but more importantly I don't understand why it is trying to install CLT when I can show that they are already available on my machine.
Right click the link below and save it as homebrew-install.sh
https://raw.githubusercontent.com/Homebrew/install/master/install.sh
Open homebrew-install.sh with a text editor and change the definition of the method should_install_command_line_tools to return 1
Make homebrew-install.sh executable (by running chmod u+x homebrew-install.sh) and then run ./homebrew-install.sh
In my case the xcode command line tools can be installed.
My environment is mac os.
In the terminal please enter
xcode-select --install
And it takes a little time to install
Check out macOS requirements in this article [https://docs.brew.sh/Installation]
good luck.

How to install gdb on MacOS terminal Sierra

I searched online about how to install gdb on macOS Sierra 10.12.2 but failed on the methods I could find. Then I figure out the following way which is easy and works fine on my machine. hope it may help you too:)
download the most recent GDB from https://www.sourceware.org/gdb/download/
expand the gdb-7.12.1.tar.xz file: tar xopf gdb-7.12.1.tar.xz
cd gdb-7.12.1 in terminal to open the gdb folder
then follow the instructions in the README file in the gdb folder, or simply follow the following steps:
./configure, wait for the terminal
make and wait again (which can take some time)
sudo make install
Now gdb is installed at /usr/local/bin/
Note that you might want to try/use LLDB (lldb) instead. This is now the default (don't know about 10.12, but on 10.13 it is installed, when you install the Xcode utilities). It even comes with a nice curses GUI, but otherwise a shell very similar to GDB.
You can also use homebrew to get gdb in mac os:
install-gdb-macos-sierra
Surprised no one mentioned:
brew install gdb
How to install brew?

Torch Lua cannot find default terminal on mac

I updated my OS to mac OS, and then updated lua and other packages with a brew upgrade. Now I can't use gnuplot in lua, I receive this error:
Can not find any of the default terminals for mac. You can manually set terminal by gnuplot.setterm("terminal-name")
Note: I am using iTerm2 as terminal, if that's any help.
The issue was actually with gnuplot itself, not lua or torch.
I just reinstalled it with x11 and it worked:
brew uninstall gnuplot; brew install gnuplot --with-x11

OS X Terminal hangs installing vNext KVM after running "source kvm.sh"

I'm trying to install vNext on my Macbook but when I run source kvm.sh the terminal just hangs.
My setup:
OSX 10.9.5 (Mavericks)
Mono 3.10.0
My problem:
I followed the instructions for installing vNext on OS X from the GitHub repo:
https://github.com/aspnet/Home
Essentially:
brew tap aspnet/k
brew install kvm
source kvm.sh
Everything seems to go fine until the step where I run source kvm.sh, which hangs the terminal with a message "[Process completed]".
Adding source kvm.sh to ~/.zshrc file starts the terminal and immediately hangs it once that runs.
What I've tried:
I uninstalled kvm (brew uninstall kvm) and aspnet/k (brew untap aspnet/k) and deleted the directory ~/.kre, then tried reinstalling it all again.
No luck.
Any ideas? Here's a screenshot:
The kvm currently not working in ZSH, Running it under /bin/bash should work quite well.
Also, make sure you remove anything to do with kvm from your .zshrc file and you should be good to go again.
according to https://github.com/aspnet/kvm/issues/83 , you can replace the kvm.sh file with the version from dev branch, which can be found under https://github.com/aspnet/kvm/blob/dev/src/kvm.sh , and zsh should be happy with it afterwards.
Worked for me.

Resources