Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

419
Views
Unable to compile with make | fatal error No space left on device

Situation: Just installed linux, Trying to learn to code c. Gets set up with sudo apt-get install build-essential. Open nano type in my code

#include <stdio.h>

int main(int argc, char *argv[])
{
        puts("Hello World.\n");
        return 0;
}

open another console tab, types in make ex1 then my world spins downward into the darkest abyss i have yet to experience on my first linux distro.

ragnar@ragnar:~/Documents/C$ make ex1
cc -Wall -g    ex1.c   -o ex1
ex1.c:7:1: fatal error: error closing /tmp/cc8d7Oap.s: No space left on device
 }
 ^
compilation terminated.
make: *** [ex1] Error 1


ragnar@ragnar:~/Documents/C$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb5       4.0G  3.8G     0 100% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            7.9G  8.0K  7.9G   1% /dev
tmpfs           1.6G  1.4M  1.6G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            7.9G  8.1M  7.9G   1% /run/shm
none            100M   28K  100M   1% /run/user
/dev/sdb2        96M   29M   68M  30% /boot/efi
/dev/sdb7        11G  248M  9.5G   3% /home

all help is appreciated.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

The partition containing the root folder (/) is 100% full. The root folder currently also contains the /tmp folder, which is used during compilation to store temporary files. As the root folder and with this the tmp folder is full, this fails.

To get around this either add more space, or reorganise the existing one.

As a workaround do

mkdir ~/tmp
export TMPDIR=~/tmp

and retry compilation.


A flexible way to organise a file system is using seperate partitions for

/
/usr
/home
/var
/tmp

A lazy approach would be to link /tmp/ to /var/tmp. This however might cause issues as in terms of clean-up the OS might handle the content in /var/tmp different from the content in /tmp. That is the content of /tmp/ would get deleted on each boot where as /var/tmp wouldn't.

over 4 years ago · Santiago Trujillo Report

0

here is my output from df:

[857][rkwill.rkwill-desktop: /home/rkwill]$ df -h -T
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda1      ext4      910G   16G  849G   2% /
none           tmpfs     4.0K     0  4.0K   0% /sys/fs/cgroup
udev           devtmpfs  3.4G  4.0K  3.4G   1% /dev
tmpfs          tmpfs     684M  1.5M  683M   1% /run
none           tmpfs     5.0M     0  5.0M   0% /run/lock
none           tmpfs     3.4G   96K  3.4G   1% /run/shm
none           tmpfs     100M   68K  100M   1% /run/user

You may notice that my disk partitioning is very simple (the swap partition is ~6gigs)

The actual disk is 1 tera byte.

tera byte disks are very cheap now-a-days.

Your whole disk seems to be ~33gig. That was great back in the days of MS-DOS and early versions of linux.

However, my ubuntu 14.04 linux is only using ~26gigs of the disk

(and I have numerous utilities, add ons, pictures, videos, source code for several projects, etc etc.)

suggest making the initial install (until you know more about how everything will work) with only the / and swap partitions.

When I use multiple partitions, I organize similar to @alk suggestion, with the addition of a partition for windows, for /lib and for /etc.

Such partitioning allows faster access on my servers, with multiple hard disks, and safer fail modes, but is hardly worth it for my desktop.

My desktop has a multi partition external tera byte hard disk for backups.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!