Saturday, December 19, 2015

grub rescue error

grub rescue error : unknown filesystem

If you have tried following commands and still you are getting grub rescue error.
ls
ls (hd0,msdosx)/ #where x is the number depends on ls output.In this case,it is 6
set prefix=(hd0,6)/boot/grub
set root=(hd0,6)
insmod normal
normal
If insmod normal command is not working and showing unknown file system error.

Solution :
Boot your linux with pendrive or cd/dvd.
Select option "Run without installing". Now you can open terminal.
You need to scan the filesystem to resolve errors. Run command
sudo fsck /dev/sda1
where /dev/sda1 is the root partition of your hard disk.

Once it scans and checks complete filesystem, reboot your system.
You will not end up with grub rescue error.

/var/tmp/mongo/contrib/php-ssl.h:33:25: error: openssl/evp.h: No such file or directory

Compilation error : mongo compilation error :
/var/tmp/mongo/contrib/php-ssl.h:33:25: error: openssl/evp.h: No such file or directory

Solution :

You need to install package openssl-devel

Run following command on Centos/Fedora/RHEL
yum install openssl-devel

Now try to compile your package again, you will not get this error.

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