/tmp folder totally full

Today I encountered this problem: I got the following error building a new release of the famous QGis source code through yaourt -Syua during the installing part, so in the end of the building process.

CMake Error at i18n/cmake_install.cmake:36 (file):
file INSTALL cannot copy file
"/tmp/yaourt-tmp-francesco/aur-qgis/src/qgis/build/output/i18n/qgis_fi.qm"
to
"/tmp/yaourt-tmp-francesco/aur-qgis/pkg/qgis/usr/share/qgis/i18n/qgis_fi.qm".
Call Stack (most recent call first):
cmake_install.cmake:60 (include)

Makefile:104: recipe for target 'install' failed
make: *** [install] Error 1

1. How solve the problem
What does this mean?

Well, first of all I looked for some feedbacks in the AUR website, but no one had the same problem. Therefore it had to be necessarily a mine one. Thinking about, I had the doubt that my memory was full (indeed my SSD is rather small). As a result of the df -h, I got the confirmation of what I had thought:

[[email protected]] ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
dev 1.9G 0 1.9G 0% /dev
run 1.9G 716K 1.9G 1% /run
/dev/sda3 67G 46G 18G 73% /
tmpfs 1.9G 80K 1.9G 1% /dev/shm
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 1.9G 1.9G 4.0K 100% /tmp
/dev/sda2 98G 91G 1.5G 99% /mnt/data
/dev/sda1 1021M 37M 985M 4% /boot
tmpfs 386M 12K 386M 1% /run/user/1000

the /tmp folder had only 4.0K available considering an initial size of 1.9G: downloading, building and installing the source code of QGis requires more than 2.0G of empty space.

Then increasing the size of the /tmp folder is rather easy: you have just to explicitly set a maximum size in your /etc/fstab, in order to override the default /tmp mount. To do that add the following line to your fstab, opening it as root:

tmpfs   /tmp         tmpfs   nodev,nosuid,size=3G          0  0

In my case, I increased the size until 3.0G.

But where does this problem come from?

2. tmpfs: temporary filesystem
SOURCE: tmpfs – ArchWiki

The tmp folder uses the temporary filesystem (tmpfs) in order to ensure that its content is automatically cleared upon reboot. As tmp, many other folders are mounted using tmpfs for instance /var/lock and /var/run.

By default, a tmpfs partition has its maximum size set to half of your total RAM, so if you have few RAM installed you have to customize it when necessary. It’s important underlining that a tmpfs partition do not consume any memory until it is actually used.

About Francesco Serafin

I am a PhD student at the Department of Civil, Environmental and Mechanical Engineering at the University of Trento. My two greatest loves: Computer Science and Water (take three with my Lenovo!:D). As a result, the aim of my life is to make both passions coexist. My gpg public key available at https://pgp.mit.edu

Leave a Reply

Your email address will not be published.

*