Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/The easy way to handle error - cannot create temp file for here-document: no space left on device.
Next
Answered
Cecil Wang
  • 22
Cecil Wang
Asked: May 18, 20222022-05-18T21:07:37+00:00 2022-05-18T21:07:37+00:00In: Programs

The easy way to handle error – cannot create temp file for here-document: no space left on device.

  • 22

. Advertisement .

..3..

. Advertisement .

..4..

For the problem “cannot create temp file for here-document: no space left on device”. I tried to fix it, but it doesn’t work and returns the result I want. Here is my program:

root@****:~# df -k
 Filesystem 1K-blocks Used Available Use% Mounted on
 udev 4077544 4 4077540 1% /dev
 tmpfs 817680 340 817340 1% /run
 /dev/vda1 82436784 34630128 43596088 45% /
 none 4 0 4 0% /sys/fs/cgroup
 none 5120 0 5120 0% /run/lock
 none 4088392 0 4088392 0% /run/shm
 none 102400 0 102400 0% /run/user
 root@****:~# df -i
 Filesystem Inodes IUsed IFree IUse% Mounted on
 udev 1019386 402 1018984 1% /dev
 tmpfs 1022098 319 1021779 1% /run
 /dev/vda1 5242880 5014058 228822 96% /
 none 1022098 2 1022096 1% /sys/fs/cgroup
 none 1022098 5 1022093 1% /run/lock
 none 1022098 1 1022097 1% /run/shm
 none 1022098 2 1022096 1% /run/user
 root@****:~# df -h
 Filesystem Size Used Avail Use% Mounted on
 udev 3.9G 4.0K 3.9G 1% /dev
 tmpfs 799M 340K 799M 1% /run
 /dev/vda1 79G 34G 42G 45% /
 none 4.0K 0 4.0K 0% /sys/fs/cgroup
 none 5.0M 0 5.0M 0% /run/lock
 none 3.9G 0 3.9G 0% /run/shm
 none 100M 0 100M 0% /run/user
 root@****:~# ls /tmp/
 root@****:~# fdisk -l
 
 WARNING: GPT (GUID Partition Table) detected on '/dev/vda'! The util fdisk doesn't support GPT. Use GNU Parted.
 
 
 Disk /dev/vda: 85.9 GB, 85899345920 bytes
 255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x00000000
 
  Device Boot Start End Blocks Id System
 /dev/vda1 1 167772159 83886079+ ee GPT

and

cannot create temp file for here-document: No space left on device

has occurred. I’ve checked the entire command line but still can’t find the mistake.

cannot create temp file for here-document
  • 2 2 Answers
  • 144 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-26T12:25:50+00:00Added an answer on June 26, 2022 at 12:25 pm

    The cause:

    You have got the error ”cannot create temp file for here-document: no space left on device” because the disk space of your computer is filled up.

    Solution:

    You can solve your problem by using:

    root@****:~# lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    
    xvda 202:0 0 150G 0 disk
    
    └─xvda1 202:1 0 8G 0 part /
    root@****:~# df -h
    
    Filesystem Size Used Avail Use% Mounted on
    /dev/xvda1 7.8G 4.5G 2.9G 61% /
    tmpfs 32G 0 32G 0% /dev/shm

    From above, you can see that EBS has 150 GB, while the root partition only has 8 GB, so you have to change the size of EBS Root Volume.

    root@****:~# sudo growpart /dev/xvda 1

    Let’s use the following command to set up “growpart”:

    root@****:~# sudo yum install -y cloud-init dracut-modules-growroot

    Finally, restart your computer and it will work well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Juliette Seguin
    2022-05-25T21:14:13+00:00Added an answer on May 25, 2022 at 9:14 pm

    This is a good idea. It worked for me.

    sudo apt-get autoclean
    • 12
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.