41酱的小草莓

导航

Mac终端解压rar

 1. 安装brew

在终端输入

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装成功后会提示

==> Next steps:

- Run `brew help` to get started

- Further documentation:

https://docs.brew.sh

 

2. 此时在终端输入

brew install unrar

出错,原因不明。。。

==> Downloading https://homebrew.bintray.com/bottles/unrar-5.7.5.high_sierra.bottle.tar.gz

==> Downloading from https://akamai.bintray.com/3d/3d5b170619917ee01c311696c457eb1b75310cc13cbe5cc7fc57c37e17c31a44?__gda__=exp=1558401851

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to akamai.bintray.com:443

Error: Failed to download resource "unrar"

Download failed: https://homebrew.bintray.com/bottles/unrar-5.7.5.high_sierra.bottle.tar.gz

Warning: Bottle installation failed: building from source.

==> Downloading https://www.rarlab.com/rar/unrarsrc-5.7.5.tar.gz

###### 8.8%

curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

Error: An exception occurred within a child process:

DownloadError: Failed to download resource "unrar"

Download failed: https://www.rarlab.com/rar/unrarsrc-5.7.5.tar.gz

 

3. 于是我进入了rar所在的文件夹,给了这个文件夹全部权限。

cd /Users/lisiyi/Documents

chmod -R 777 ./

再解压一次,报错unrar not found,说明unrar没安装上。

unrar x Node.rar

-bash: unrar: command not found

查看了一下brew,么得问题。

$ brew

Example usage:

brew search [TEXT|/REGEX/]

brew info [FORMULA...]

brew install FORMULA...

brew update

brew upgrade [FORMULA...]

brew uninstall FORMULA...

brew list [FORMULA...]

Troubleshooting:

brew config

brew doctor

brew install --verbose --debug FORMULA

Contributing:

brew create [URL [--no-fetch]]

brew edit [FORMULA...]

Further help:

brew commands

brew help [COMMAND]

man brew

https://docs.brew.sh

 

4. 那么就再装一次unrar~

brew install unrar

Updating Homebrew...

==> Auto-updated Homebrew!

Updated 1 tap (homebrew/core).

==> New Formulae

dbmate

==> Downloading https://homebrew.bintray.com/bottles/unrar-5.7.5.high_sierra.bottle.tar.gz

==> Downloading from https://akamai.bintray.com/3d/3d5b170619917ee01c311696c457eb1b75310cc13cbe5cc7fc57c37e17c31a44?__gda__=exp=1558404088

######################################################################## 100.0%

==> Pouring unrar-5.7.5.high_sierra.bottle.tar.gz

🍺 /usr/local/Cellar/unrar/5.7.5: 6 files, 520.4KB

==> `brew cleanup` has not been run in 30 days, running now...

Pruned 2 symbolic links and 3 directories from /usr/local

就莫名成功了???(Updating Homebrew...的时候要等超级无敌久...)

 

5. 好了 终端输入`unrar x 文件`

解压试试

unrar x Node.rar

UNRAR 5.71 freeware Copyright (c) 1993-2019 Alexander Roshal

 

Extracting from Node.rar

Creating Node OK

Creating Node/01-网络基础.assets OK

Extracting Node01-网络基础.assets/10.png OK

Extracting Node/01-网络基础.assets/11.png OK

All OK

 

莫名成功!!

虽然现在还不知道为什么。。。

 

posted on 2019-10-06 13:50  41酱的小草莓  阅读(1129)  评论(0编辑  收藏  举报