Mac終端解壓rar

 1. 安裝brew

在終端輸入git

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

安裝成功後會提示github

==> Next steps:

- Run `brew help` to get started

- Further documentation:

https://docs.brew.sh

 

2. 此時在終端輸入

brew install unrar

出錯,緣由不明。。。ruby

==> 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沒安裝上。bash

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...的時候要等超級無敵久...)curl

 

5. 好了 終端輸入`unrar x 文件`

解壓試試fetch

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

 

莫名成功!!

雖然如今還不知道爲何。。。ui

相關文章
相關標籤/搜索