M1 macbookでemacsのbuild
- Mon
- 14:34
- iOS/MacOS
M1 macbookが来たので早速emacsのbuild。
普通にやると下記のようなエラーがでるので、arch -x86_64 をつけてrosetta上でやるとうまくいく。
configure: error: Emacs does not support 'arm-apple-darwin20.1.0' systems.
普通にやると下記のようなエラーがでるので、arch -x86_64 をつけてrosetta上でやるとうまくいく。
configure: error: Emacs does not support 'arm-apple-darwin20.1.0' systems.
$ arch -x86_64 bash The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. bash-3.2$ ./configure --prefix=${HOME}/local --without-x --with-gnutls=no --with-mailutils checking for xcrun... xcrun checking for make... yes checking for GNU Make... make checking build system type... x86_64-apple-darwin20.1.0 checking host system type... x86_64-apple-darwin20.1.0 checking for gcc... gcc ... $ make /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib all GEN alloca.h GEN byteswap.h ... bash-3.2$ ./src/emacs --version GNU Emacs 27.1 Copyright (C) 2020 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.
Emacs 27.1のelpy設定
- Mon
- 14:20
- python
emacs install後にelpyの設定を忘れてしまうのでそのメモ。
M-x package-list-packages を行うと下記のようなエラーが出る場合、必要なtoolや設定がされていないのが原因。
Could not create connection to orgmode.org:443
gnutls-cliのコマンドが失敗している場合があるのでgnutlsをインストールする必要がある。
https://brew.sh/index_ja
M1 macbook air で試したが、関連するpkgは既にarm版があったので非常に楽。対応早すぎ。
これで、package-list-packages時に実行される「gnutls-cli --x509cafile /etc/ssl/cert.pem -p 443 rgmode.org’ --protocols ssl3...」が正常終了するようになる。
その後は、sudo pip3 install virtualenv flake8 等で、elpy-configに必要なものを入れる。
M-x package-list-packages を行うと下記のようなエラーが出る場合、必要なtoolや設定がされていないのが原因。
Could not create connection to orgmode.org:443
gnutls-cliのコマンドが失敗している場合があるのでgnutlsをインストールする必要がある。
まず、 .emacsにrepositoryを設定
(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t) (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) (add-to-list 'package-archives '("ELPA" . "http://tromey.com/elpa/") t)
gnutls をインストール
homebrewで入れるのでまずhomebrewをインストール。その後、gnutlsをインストール。https://brew.sh/index_ja
M1 macbook air で試したが、関連するpkgは既にarm版があったので非常に楽。対応早すぎ。
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" $ brew install gnutls
これで、package-list-packages時に実行される「gnutls-cli --x509cafile /etc/ssl/cert.pem -p 443 rgmode.org’ --protocols ssl3...」が正常終了するようになる。
その後は、sudo pip3 install virtualenv flake8 等で、elpy-configに必要なものを入れる。