2017-05-21 12 views
6

は私がやってみました:OS Xでemacsを正しくインストールするにはどうしたらいいですか?

brew install emacs --HEAD --use-git-head --with-cocoa --with-gnutls --with-rsvg --with-imagemagick 

をしかし、私は

brew info emacs 

emacs: stable 25.2 (bottled), HEAD 

を行うと、私はemacsの

emacs --version 
-bash: /usr/local/Cellar/emacs/24.5/Emacs.app/Contents/MacOS/Emacs: No such file or directory 

--versionを実行するとき、私はEmacsの初心者です。理解するのはちょっと難しいです。そして、私はデフォルトのEmacsを削除したかもしれません。

+0

多分あなたが探しているものではありませんが、AquaMacsを見てみてください。 osx – Duxducis

+0

@Duxducisありがとうございます。私はGNUバージョンを実行することを好むでしょう... – maximusdooku

+1

Gotchaは、OSXのGNUバージョンのプリコンパイルされたバイナリです。https://emacsformacosx.com/ – Duxducis

答えて

9

最新の emacs 25.2を入手するには、それらの引数のいくつかをbrewに渡す必要はありません。次

を試してみてください、あなたの醸造のインストールは、あなたが実行したときにあなたが得るメッセージ

brew doctor 

OKですチェックemacsの

brew uninstall emacs 

クリーンアウト以前にダウンロードしたソースファイル

brew cleanup 

を削除しますemacs --versionは、部分的にインストールされたemacsのバージョンを示します。24.実行中のBrew Doctor Shold問題の特定に役立ちます。

brew update 

あなたは、最新の醸造を実行してくださいそれらのいずれかが前提条件

brew upgrade 

あり、その後

brew install emacs --with-cocoa --with-gnutls --with-rsvg --with-imagemagick 
でのemacsをインストールする場合にはあなたが持っている任意の醸造のものをアップグレード

ください

brewからのメッセージを受信します。 、その後に新しいバージョンが正しく/アプリケーションフォルダ にリンクされていることを確認するために

brew linkapps emacs 

を実行している助言する醸造の使用をインストール中に。私はこれがあなたのインストールの欠落したステップかもしれないと思う。このコマンドは推奨されていませんが、代わりにキャスク・バージョンを使用するように指示しています。私はキャスクバージョンでいくつかの問題を発見したので、ローカルに構築されたバージョン(キャスクバージョンはemacsforosxバイナリを使用します)を使用することを好みます。非キャッシュバージョンを使用しているときにlinkappsを実行する必要があるかどうかは不明ですが、インストールではそのことを知らせる必要がありますので、すべての出力を確認してください(メッセージは最後ではなく、プロセス出力)。

最新の 開発版をインストールする場合にのみ必要なその他の引数は、ちょっとしたことが始まったばかりの場合はお勧めできません。あなた が望むすべては、/ usr/local/binには、OSXに同梱のEmacsの非常に古いバージョンを参照するemacsの を避けるためには/ usr/binの前に、あなたのパスにあることを確認してください25.2

をemacsのです。

+1

linkappsは廃止されましたか? – maximusdooku

+0

また、エラー:不明なコマンド:削除 – maximusdooku

+0

申し訳ありません、私の間違いは:削除してください。アンインストールまたは削除を使用します。 WRTのlinkappsは、それがdepricatedされていた認識していませんでした。しかし、emacsをアンインストールした後で、/ Applicaitonsまたは〜/ Applicaitonsに古いEmacs.appがないことを確認してください。もしあれば、削除してからhomebrewをインストールしてください。 brew caskのemacsもあることに注意してください。いくつかは「推奨」されています(macforosxバイナリを使用しています)。私はそれを試していくつかの問題を発見したので、ローカルに構築されたバージョンに戻った。 –

1

あなたはbrew uninstall emacsbrew cleanupで正常な状態に戻ることができるはずです。

醸造物とキャスクが結合して以来、brew cask install emacsになりました。 GUIをインストールすることを前提とします。

4

この10月2017年用の更新プログラムは、今のEmacsをインストールするための簡単な方法は、醸造樽にこれにより

brew cask install emacs 

を歌っているが、それはうまく動作しますが、私はGNUTLSの問題を持っているし、最後のORG(9.1をインストールします。 6)が、それは伝統的な方法のためによく

働いて、あなたのシステムや夜間のリリースと、より統合されたemacsの取得あなたは

brew install emacs --HEAD --with-cocoa --with-gnutls --with-librsvg [email protected] --with-mailutils 

番目にインストールすることができます

brew linkapps emacs 
rm /Applications/Emacs.app 
osascript -e 'tell application "Finder" to make alias file to POSIX file "/usr/local/opt/emacs/Emacs.app" at POSIX file "/Applications"' 

し、最終的に取る:電子の--headはHEAD

せずに分散し、最新のためのEmacs 27を、取得後、あなたは、これはスポットライトを使用するために行う必要があります(23-01-2018)今必要とせず、見てくださいemacs wiki

Homebrew has Emacs 25.3 as of October 2017. Cask homebrew installation

Homebrew now recommends to use the cask version with the following message: “Please try the Cask for a better-supported Cocoa version”

To install the cask version:

brew cask install emacs

This installs a pre-built package from https://emacsformacosx.com/ Standard homebrew installation

If you prefer not to run the cask version, you can still use the old homebrew recipe.

A Cocoa-specific Emacs.app can be built using the --with-cocoa switch. 
A version supporting X11 can be built using the --with-x switch. Note that this version will not have all of the features of the Cocoa 

version; use only if necessary.

Other options include:

--keep-ctags Don’t remove the ctags executable that emacs provides. Use of this flag is not recommended Instead, use brew 

install ctags after installation. --srgb This option will enable sRGB colors when using Cocoa.

To install using the --with-cocoa switch, one simply uses:

brew install --with-cocoa emacs

to get some “pretty” colours add the --srgb switch:

brew install --with-cocoa --srgb emacs

and finally link it to your Applications folder:

brew linkapps emacs

This creates a symlink and not an alias. So Spotlight may not find it (tested on macOS Sierra 10.12.2). Spotlight indexes symlinks to files that are treated as system files, but it doesn’t show them in the GUI. It does show aliases though, so you could just command-option-drag /usr/local/Cellar/emacs/*/Emacs.app to /Applications/ from Finder. Or:

$ osascript -e "tell application \"Finder\" to make alias file to (POSIX file \"/usr/local/Cellar/emacs-plus/25.3/Emacs.app\") at POSIX file \"$HOME/Applications\""

After installation, using the emacs command in the terminal or shell will run the -nw version of Emacs. If you want to run the Cocoa version using this command, you simply add a line to your .bash_profile. Emacs-Plus version in tap

To instead use the emacs-plus version, which is like regular homebrew emacs but with some configuration options enabled,

brew tap d12frosted/emacs-plus brew install emacs-plus

Mitsaharu version in tap

To instead use the Yamamoto Mitsuharu version of Emacs 25.2 (with more mac-specific features):

brew tap railwaycat/emacsmacport brew install emacs-mac

and finally link it to your Applications folder:

brew linkapps emacs-mac

関連する問題