LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-29-2012, 02:38 AM   #1
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Rep: Reputation: 15
compilation error, no free space, how to clean up?


I am unable to compile my codes. When I try I get this error:

Code:
fatal error: error writing to /tmp/ccU2CdiZ.s: No space left on device
compilation terminated.
If I do
Code:
df -h
I get

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             188G  187G     0 100% /
none                  3.9G  288K  3.9G   1% /dev
none                  4.0G     0  4.0G   0% /dev/shm
none                  4.0G   80K  4.0G   1% /var/run
none                  4.0G     0  4.0G   0% /var/lock
none                  4.0G     0  4.0G   0% /lib/init/rw
/dev/sda1             184M   25M  151M  14% /boot
/dev/sda7             267G  222G   32G  88% /home
which means there is plenty of space in my /home directory.
Only place seems to be occupied is /dev/sda6. Should that be cleared?

My /tmp has nothing in it.

Can anyone help?

Thanks
 
Old 05-29-2012, 02:50 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Your / directory is at 100% and that's why you're getting the error. Since /var/log is in there too, I'd start by looking there and do some cleaning up by removing old log files that might be taking up lots of space over time. Assuming you're using Ubuntu you might also remove all downloaded packages in /var/cache/apt by using
Code:
sudo apt-get clean
That for starters. Next look at whatever 'old' files you might have that can be deleted. There's nobody but you who knows what exactly you have on your system. Just 'compiling away' without cleaning up the house results in this.

Kind regards,

Eric
 
Old 05-29-2012, 02:50 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,308

Rep: Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702
/ should be freed anyway, otherwise your system will die soon....
in the linux world there is a variable TMPDIR to define the dir to be used instead of /tmp.
see: http://gcc.gnu.org/onlinedocs/gcc/En...Variables.html

Last edited by pan64; 05-29-2012 at 02:56 AM. Reason: additional info
 
Old 05-29-2012, 03:04 AM   #4
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Original Poster
Rep: Reputation: 15
Thanks. Actually the system is screwed up by some other users and I am not in a position right now to find out what they have done exactly. I am trying to clean it up and avoid a fresh installation. But I do not know what are the files that can be safely deleted. I did a
Code:
sudo apt-get clean
, but did not make any difference.

EricTRA, you suggested deleting old files. Could you also suggest which directories I should look at to delete these files?

pan64, Thanks for your suggestion on TMPDIR. However I should free up my system anyway.

Thanks
 
Old 05-29-2012, 03:08 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,308

Rep: Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702
you can try du -sh * in any dir to find which subdir contains most of that 188 GB
 
Old 05-29-2012, 03:18 AM   #6
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Original Poster
Rep: Reputation: 15
I did a du -sh * to find out the biggest directory. Except /home and /media everything else looks alright. Could you have a look and suggest what am I missing?
Code:
7.8M	/bin
19M	/boot
4.0K	/cdrom
288K	/dev
17M	/etc
222G	/home
0	/initrd.img
150M	/lib
13M	/lib32
0	/lib64
16K	/lost+found
169G	/media
4.0K	/mnt
4.9G	/opt
du: cannot access `/proc/3395/task/3395/fd/4': No such file or directory
du: cannot access `/proc/3395/task/3395/fdinfo/4': No such file or directory
du: cannot access `/proc/3395/fd/4': No such file or directory
du: cannot access `/proc/3395/fdinfo/4': No such file or directory
du: cannot access `/proc/6956': No such file or directory
du: cannot access `/proc/7019': No such file or directory
du: cannot access `/proc/7020': No such file or directory
0	/proc
8.9G	/root
8.3M	/sbin
4.0K	/selinux
200K	/srv
0	/sys
20K	/tmp
3.5G	/usr
273M	/var
0	/vmlinuz
Thanks,
 
Old 05-29-2012, 03:24 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,308

Rep: Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702
what is in /media?
 
Old 05-29-2012, 03:34 AM   #8
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Original Poster
Rep: Reputation: 15
It is an external hard drive connected. Could that be the issue?
 
Old 05-29-2012, 03:42 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,308

Rep: Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702
no, an external drive cannot be the issue, just I'm not sure. In your original post you sent the result of df -h and there is no /media.
 
Old 05-29-2012, 03:47 AM   #10
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Original Poster
Rep: Reputation: 15
It was always connected. df -h shows the same output, i.e, without /media. What could be wrong?
 
Old 05-29-2012, 03:52 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,308

Rep: Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702
so try: df -h /media/.
 
Old 05-29-2012, 04:57 AM   #12
Babertje
Member
 
Registered: Jun 2009
Location: Haarlem, The Netherlands
Distribution: Archlinux
Posts: 125

Rep: Reputation: 20
Look like /media is not mounted to an external drive, it's just filling up your / (/dev/sda6)
 
Old 05-29-2012, 05:11 AM   #13
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Original Poster
Rep: Reputation: 15
This is what I get.
Code:
df -h /media/
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             188G  187G     0 100%
How to go ahead now?
 
Old 05-29-2012, 05:13 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,308

Rep: Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702Reputation: 7702
so yes, it is not an external drive. Here is an idea:
You may mount your drive to /media1 or whatever and move the important content from /media.
 
Old 05-29-2012, 06:34 AM   #15
sumesh.pt
Member
 
Registered: Nov 2007
Posts: 57

Original Poster
Rep: Reputation: 15
I deleted some 8 GB stuff from /media and now this is what it looks like
Code:
df -h /media/
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             188G  180G     0 100% /
Can you imagine what is happening?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
clean up free some disk space fachhoch@gmail.com Linux - Newbie 5 02-13-2012 09:09 PM
"clean" or emptying trash does not free up enough space for updates kevishnu Linux - Newbie 2 09-25-2009 07:12 PM
resizing linux partitions to free up space for window$ - safe or clean install? dianat100 Linux - Newbie 5 03-09-2005 01:05 PM
Wine compilation eating my whole free space ivanatora Linux - General 5 08-03-2004 08:26 AM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 06:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration