Home>

I am trying to deploy a web application currently under development using Elastic Beanstalk.
At that time, an unknown error occurred, so please let me know.

Assumption:

This siteWe are doing the deployment work with reference to.
You've already created an IAM for the AWS CLI.

ec2-user: ~/environment $aws --version
aws-cli/1.18.94 Python /3.6.12 Linux/4.14.200-116.320.amzn1.x86_64 botocore/1.17.17


Homebrew is also installed

ec2-user: ~/environment $brew -v
Homebrew 2.5.11
Homebrew/linuxbrew-core (git revision f030;last commit 2020-11-19)

There is an error in the part that installs the AWS CLI.

ec2-user: ~/environment $brew install awsebcli
#Since it is quite long, some parts are omitted.
..
..
..
tar: [email protected]/3.9.0_1/include: Cannot mkdir: No space left on device
tar: [email protected]/3.9.0_1/include/python3.9/pystrtod.h: Cannot open: No such file or directory
tar: [email protected]/3.9.0_1/include: Cannot mkdir: No space left on devicetar: [email protected]/3.9.0_1/include/python3.9/memoryobject.h: Cannot open: No such file or directory
tar: [email protected]/3.9.0_1/include: Cannot mkdir: No space left on device
tar: [email protected]/3.9.0_1/include/python3.9/pyctype.h: Cannot open: No such file or directory
tar: [email protected]/3.9.0_1/LICENSE: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors
Warning: Bottle installation failed: building from source.
==>Installing dependencies for [email protected]: pkg-config
==>Installing [email protected] dependency: pkg-config
==>Pouring pkg-config-0.29.2_4.x86_64_linux.bottle.tar.gz
tar: /home/ec2-user/.cache/Homebrew/downloads/9ae792be0ff044cacdab5b0bbb96110b61ccaf488d49843e4b2fdc4cb66ca3a5--pkg-config-0.29.2_4.x86_64_linux.bottle.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Error: Failure while executing;`tar xof /home/ec2-user/.cache/Homebrew/downloads/9ae792be0ff044cacdab5b0bbb96110b61ccaf488d49843e4b2fdc4cb66ca3a5--pkg-config-0.29.2_4.x86_64_linux.bottle.tar.gz -C/tmp/2020 47muv9` exited with 2. Here's the output:
tar: /home/ec2-user/.cache/Homebrew/downloads/9ae792be0ff044cacdab5b0bbb96110b61ccaf488d49843e4b2fdc4cb66ca3a5--pkg-config-0.29.2_4.x86_64_linux.bottle.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Warning: Bottle installation failed: building from source.
cp: error writing ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/Makefile.in’: No space left on device
cp: failed to extend ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/Makefile.in’: No space left on device
cp: error writing ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/make-patch.sh’: No space left on device
cp: failed to extend ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/make-patch.sh’: No space left on device
cp: error writing ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/libcharset-glib.patch’: No space left on device
cp: failed to extend ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/libcharset-glib.patch’: No space left on device
cp: error writing ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/update.sh’: No space left on device
cp: failed to extend ‘/tmp/pkg-config-20201119-2364-1d6qg2p/pkg-config-0.29.2/glib/glib/libcharset/update.sh’: No space left on device
What I tried

I don't understand what's really wrong because the error statement is too long
Common to all sentences"No space left on device"Because the word was included, I examined that part.

I wondered if it was a capacity problem, so I hit it as follows to check it.

ec2-user: ~/environment $df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 483M 60K 483M 1%/dev
tmpfs 493M 0 493M 0%/dev/shm
/ dev/xvda1 9.8G 9.7G 15M 100% /
ec2-user: ~/environment $df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
devtmpfs 123467 434 123033 1%/dev
tmpfs 126142 1 126141 1%/dev/shm
/ dev/xvda1 655360 482794 172566 74% /
ec2-user: ~/environment $


From the above results, is it correct to recognize that a long error has occurred because the capacity has already reached 100%?

Also, if you get an error due to other factors, please let us know in that case as well.

Supplementary information (FW/tool version, etc.)

Rails 5.2.4.3
ruby 2.5.1

  • Answer # 1

    At least capacity is a problem, so delete any unnecessary files or logs.
    Or expand the capacity of EBS.

    And I don't recommend using brew on Linux without knowing it (because it conflicts with yum)