Saturday, December 19, 2015

mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device

mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device

Not able to create new files, Not able to restart apache or mysql, Not able to run find or similar commands because of above error.

Solution :

You need to check two things on your system, first remaining space and second usage of inodes.

Delete some large files and make some empty space.

But if your hard disk is not full and sufficient space is there but still you are getting this error, there is fair enough chance that inode may be the reason.

If used inodes are 100% then you can not create any more files or restart servers or execute find command etc. Every new file or directory needs inode number and if all inodes are used, you can not create new.

Now how to check use inode %. Simply run command :
df -i

Here you can see total number of inode and used number of inode. If you have used all inodes, it means some program is creating large number of small files like any session directory of web application (ex- magento) or any similar program, You need to delete these all unused files and make some inodes free.

Once you have enough inodes, you can start creating files or restarting servers or making other tasks.

ffmpeg: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory

ffmpeg compilation error on CentOS 

ffmpeg: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory

After compilation of ffmpeg on Centos, you run the command ffmpeg and you get this error.

Solution :

Open file /etc/ld.so.conf and add the content in it.
sudo nano /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/lib
/usr/local/lib

Save file and run command.
ldconfig
Now run the command ffmpeg, you will not get this error.


Tuesday, December 15, 2015