emacs-china / Spacemacs-rocks

Happy Hacking Emacs & Spacemacs (Simplified Chinese)
http://book.emacs-china.org
2.12k stars 323 forks source link

安装cask(day8) #165

Closed zhumingpassional closed 2 years ago

zhumingpassional commented 2 years ago

在day8的视频中安装cask,

本人在MAC电脑的终端里输入以下命令 curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python 并没有安装而是显示下面的提示,请问这是怎么回事? 安装cask有其他的办法吗?

!!! !!! DEPRECATION NOTICE !!! !!! !!! The cask go script will be removed on 2021/06/01. !!! !!! This is due to security concerns about the way python is !!! invoked from curl, and to remove the python dependency from cask. !!! !!! The way to install cask without depending on the go script !!! is very simple. Just clone Cask and pass the PATH. !!! !!! git clone https://github.com/cask/cask ~/.cask !!! PATH=$HOME/.cask/bin:$PATH !!! !!! # If you want to make it permanent !!! echo 'PATH=$HOME/.cask/bin:$PATH' >> .bashrc !!!

Directory /Users/mingzhu/.cask exists. Is Cask already installed?

jcs090218 commented 2 years ago

有興趣的話, 可以試試看Eask. 他基本可以取代Cask了.

優劣我有寫在我的部落格, 看這裡.

macOS 安裝如下:

$ brew install node
$ npm install -g @emacs-eask/eask
zhumingpassional commented 2 years ago

Thanks for quick response.

I tried as you suggested, but failed. Do you have any other methods? Thanks.

After " brew install node", it raises errors: Error: Calling Cask::DSL::Version#after_colon is disabled! Use Cask::DSL::Version#csv instead. Please report this issue to the homebrew/cask tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fritzing.rb:10

Error: No such file or directory @ rb_sysopen - /Users/mingzhu/Library/Caches/Homebrew/downloads/61a15218bad0cd39085ef6fede94ce4a0a98a262270e2917aeab449c34aa5319--c-ares-1.17.1.big_sur.bottle.tar.gz

After " npm install -g @emacs-eask/eask", it raises errors: npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/@emacs-eask npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@emacs-eask' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@emacs-eask'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/@emacs-eask' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/mingzhu/.npm/_logs/2022-06-26T00_37_04_280Z-debug-0.log

jcs090218 commented 2 years ago

It seems like you should give superuser privileges to your command, see https://apple.stackexchange.com/questions/14421/how-do-i-run-terminal-in-sudo-mode.

sudo npm install -g @emacs-eask/eask

I'm not quite sure about macOS, but in Ubuntu (Linux) adding sudo would just work.

zhumingpassional commented 2 years ago

fixed. Thank you very much for your suggestions.