5
2

More than 1 year has passed since last update.

curl実行時に`Failed writing body...`とエラーが出力される場合の解決策

Posted at

curl実行時にFailed writing body...とエラーが出力される場合の解決策

$ curl xxx...
 Failed writing body

http bodyを何かしらの理由でwrite失敗している様子。以下のいずれかが原因である可能性がある

1. curl実行時のオプション間違い
2. curl実行後にPIPE渡ししている先の処理が間違い
3. curl -o xxx で指定している出力先のディスク容量が限界に達している (df -hで確認)
4. curl -o xxx で指定している出力先へのwrite権限がない(ls -l でディレクトリオーナを確認する)

自分がエラー日引いた時は4.が該当していたようで、権限を更新して解決した

参考

Why does cURL return error "(23) Failed writing body"?
MacにNode.jsをダウンロードする際に「Warning: Failed to create the file ... curl: (23) Failed writing body (0 != 847)」というエラー
【jqコマンド】selectで(23) Failed writing bodyというエラーが出る

5
2
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
5
2