10
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Mac Nodebrewを用いてNode.jsをインストールした時にエラーが出た話

Last updated at Posted at 2021-02-10

目的

  • Nodebrewを用いたNode.jsインストール時に出たエラーを解決した話をまとめる

実施環境

  • ハードウェア環境
項目 情報 備考
OS macOS Catalina(10.15.3)
ハードウェア MacBook Air (11-inch ,2012)
プロセッサ 1.7 GHz デュアルコアIntel Core i5
メモリ 8 GB 1600 MHz DDR3
グラフィックス Intel HD Graphics 4000 1536 MB

エラー内容

  • Nodebrewを使用してNode.jsの最新の安定バージョンをインストールしようとした時に下記のエラーが発生した。

  • 実行コマンドをとエラー内容を下記に記載する。

    $ nodebrew install-binary stable
    Fetching: https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.gz
    Warning: Failed to create the file                                                                                          
    Warning: /Users/ユーザ名/.nodebrew/src/v12.16.1/node-v12.16.1-darwin-x64.tar.gz: 
    Warning: No such file or directory
    
    curl: (23) Failed writing body (0 != 1016)
    download failed: https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.gz
    

エラー原因

  • 原因は単純でインストール先のディレクトリがみなさんのPCに存在しないためインストールできないと言われている。

解決方法

  1. 下記コマンドを実行してインストール用のディレクトリを作成する。

    $ mkdir ~/.nodebrew/src
    
  2. もう一度問題のコマンドを実行する。

    $ nodebrew install-binary stable
    Fetching: https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.gz ###################################################################################################################### 100.0%
    Installed successfully
    
  3. 正常に実行された。

10
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?