Category Archives: linux

FFMPEG common errors

FFMPEG common errors

I am not writing about the installation of ffmpeg or ffmpeg-php and related binaries as there are plenty of tutorials out there in internet, but there are a few errors on which you often end up while installing ffmpeg. I’m scribbling down the errors which I’ve come across while installing ffmpeg.A couple of fixes for all errors, alteast one of it should fix the issue


‘make’ fails with the following error

In file included from libavdevice/v4l.c:33:
/usr/include/linux/videodev.h:56: error: syntax error before “ulong”
/usr/include/linux/videodev.h:72: error: syntax error before ‘}’ token
libavdevice/v4l.c: In function `grab_read_header’:
libavdevice/v4l.c:75: error: storage size of ‘tuner’ isn’t known
libavdevice/v4l.c:133: error: invalid application of `sizeof’ to incomplete type `video_tuner’
libavdevice/v4l.c:140: error: invalid application of `sizeof’ to incomplete type `video_tuner’
libavdevice/v4l.c:75: warning: unused variable `tuner’


1)Uppgrade the linux and headers to 2.6.25 or higher (which is going to break your head and so no to it imo) or disable V4L and V4L2 during configuration. I dont think you’ll need V4L and V4L2 for your applications,so start over again after running the following commands in your ffmpeg source directory

make distclean
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared –disable-demuxer=v4l –disable-demuxer=v4l2

2) edit the file /usr/include/linux/videodev.h using your favourate editor and go to line 56, replace the line as shown below

ulong rangelow, rangehigh; /* Tuner range */

change it to

unsigned long rangelow, rangehigh; /* Tuner range */


checking for ffmpeg headers… configure: error: ffmpeg headers not found. Make sure you’ve built ffmpeg as shared libs using the –enable-shared option

1) install ffmpeg-devel, go get the stuff for your distro from google.
I downloaded rpm for centos4 from here

2)Simply create a ffmpeg folder in /usr/local/include/ and run the following to copy all the header files

cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg


ffmpeg: error while loading shared libraries: cannot open shared object file: No such file or directory

1) do ldconfig
2) find / -name ‘*’

once the find returns its path, export it using the following command

export LD_LIBRARY_PATH=<path>

Say for example if find returns the following path


the export command would be

export LD_LIBRARY_PATH=/usr/local/lib/


make: *** [ffmpeg_frame.lo] Error 1

1)Execute the following in the ffmpeg-php folder.
cp ffmpeg_frame.loT ffmpeg_frame.lo


PHP Warning: PHP Startup: Unable to load dynamic
library ‘/usr/lib/php/modules/’ – /usr/lib/php/modules/ undefined symbol: >>le_ffmpeg_frame in Unknown on line 0

ffmpeg may be installed in /usr/bin or /usr/local/bin, php might be checking for the stuff in the wrong location

Reboot command in a VPS

Reboot command in a VPS

Did you ever try restarting your virtuozzo VPS by hitting the ‘reboot’ command inside the VPS? If you’ve done, you might have had troubles in having it back online automatically. ‘reboot’ command works in a different way inside a VPS unlike a dedicated server. when you issue this command, VPS is stopped and started by a different script in the hardware node which is executed  in every minute.

When you hit reboot command inside the VPS, it invokes reboot system call with argument ‘restart’, which has to be handled by BIOS in normal cases. But since its a VPS, the system call is blocked from within since the VPS shouldnt talk directly with bios, which otherwise can result in a reboot of hardware node! So internelly, the reboot command is being handled this way

1. the VPS is simply stopped when reboot command is issues from within.
2. VPS is started again using a script /etc/sysconfig/vz-scripts/vereboot which is invoked automatically using a cron job specified in  /etc/cron.d/vereboot in ever 1 or 2 minutes depending on the cron

So its a better Idea to go for VZPP to get your virtuozzo VE rebooted rather than issuing a reboot command

rkhunter installation/upgradation

rkhunter installation/upgradation

You might have recieved warnigs like the one shown below regarding rkhunter in your server,  the warning “This operating system is not fully supported” demands an upgradation of rkhunter.


No logfile given: using default.
Determining OS… Warning: This operating system is not fully supported!
Checking for allowed root login… Watch out Root login possible. Possible risk!
Checking for allowed protocols…   [ Warning (SSH v1 allowed) ]

I’ve given below the steps you need to take for getting rkhunter updated.well, the steps are same for new installation of rkhunter.

you can check the current rkhunter version using the following command

#/usr/local/bin/rkhunter –versioncheck [installaion path may differ, in my case,its /usr/local/bin/rkhunter]

once you run versioncheck it tells you the current version installed in your server as well as the latest update available, the latest as of now, is version 1.3.2.

-bash-3.00# /usr/local/bin/rkhunter –versioncheck
[ Rootkit Hunter version 1.3.0 ]

Checking rkhunter version…
This version  : 1.3.0
Latest version: 1.3.2
Update available

Well, lets try installing it.

Go to an installation directory, preferebly /usr/src

cd /usr/local/src

get the latest version of rkhunter from,untar it and get in to the installation folder.

cd rkhunter-1.3.0

You can pass the needed options while running the installation script ./

./  –help
Rootkit Hunter installer 1.2.6
Usage: ./ <parameters>

Ordered valid parameters:
–help (-h)      : Show this help.
–examples       : Show layout examples.
–layout <value> : Choose installation template (mandatory switch).
The templates are:
- default: (FHS compliant),
- /usr,
- /usr/local,
- oldschool: previous version file locations,
- custom: supply your own prefix,
- RPM: for building RPM’s. Requires $RPM_BUILD_ROOT.
–striproot      : Strip path from custom layout (for package maintainers).
–install        : Install according to chosen layout.
–show           : Show chosen layout.
–remove         : Uninstall according to chosen layout.
–version        : Show the installer version.

not to make things complex, lets issue the following command

./ –layout default –install

rkhunter will get installed in its default location.

Inorder to get rkhunter  updated to latest verson, issue the following command

usr/local/bin/rkhunter –update

hurray, your done. Go with your first scan using the following command

/usr/local/bin/rkhunter -c –createlogfile

So,at a sigle shot, these are the steps you’ve taken.

cd /usr/src
tar -zxvf rkhunter-1.3.2.tar.gz
cd rkhunter-1.3.2
./ –layout default –install
/usr/local/bin/rkhunter –update


The complete process is given below.

-bash-3.00# /usr/local/bin/rkhunter –versioncheck
[ Rootkit Hunter version 1.3.0 ]

Checking rkhunter version…
This version  : 1.3.0
Latest version: 1.3.2
Update available

-bash-3.00# cd /usr/src
-bash-3.00# wget
[1] 31845
-bash-3.00# –07:51:44–
=> `rkhunter-1.3.2.tar.gz?modtime=1204134588′
Connecting to||:80… connected.
HTTP request sent, awaiting response… 302 Found
Location: [following]
=> `rkhunter-1.3.2.tar.gz’
Connecting to||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 269,563 (263K) [application/x-gzip]

100%[==============================================================================================>] 269,563        1.18M/s

07:52:09 (1.18 MB/s) – `rkhunter-1.3.2.tar.gz’ saved [269563/269563]

tar -zxvf rkhunter-1.3.2.tar.gz
[1]+  Done                    wget
-bash-3.00# cd rkhunter-1.3.2
-bash-3.00#  ./ –layout default –install
Checking system for:
Rootkit Hunter installer files: found. OK
Available file retrieval tools:
wget: found. OK
Starting installation/update

Checking PREFIX /usr/local: exists, and is writable. OK
Checking installation directories:
Directory /usr/local/share/doc/rkhunter-1.3.2: creating: OK.
Directory /usr/local/share/man/man8: exists, and is writable. OK
Directory /etc: exists, and is writable. OK
Directory /usr/local/bin: exists, and is writable. OK
Directory /usr/local/lib: exists, and is writable. OK
Directory /var/lib: exists, and is writable. OK
Directory /usr/local/lib/rkhunter/scripts: exists, and is writable. OK
Directory /var/lib/rkhunter/db: exists, and is writable. OK
Directory /var/lib/rkhunter/tmp: exists, and is writable. OK
Directory /var/lib/rkhunter/db/i18n: exists, and is writable. OK
Installing OK.
Installing OK.
Installing OK.
Installing OK.
Installing OK.
Installing OK.
Installing OK.
Installing OK.
Installing backdoorports.dat: OK.
Installing mirrors.dat: OK.
Installing os.dat: OK.
Installing programs_bad.dat: OK.
Installing programs_good.dat: OK.
Installing defaulthashes.dat: OK.
Installing md5blacklist.dat: OK.
Installing suspscan.dat: OK.
Installing rkhunter.8: OK.
Installing CHANGELOG: OK.
Installing FAQ: OK.
Installing LICENSE: OK.
Installing README: OK.
Installing WISHLIST: OK.
Installing language support files: OK.
Installing rkhunter: OK.
Installing rkhunter.conf in no-clobber mode: OK.
>>> PLEASE NOTE: inspect for update changes in /etc/rkhunter.conf.20095
>>> and apply to /etc/rkhunter.conf before running Rootkit Hunter.
Installation finished.
-bash-3.00#  /usr/local/bin/rkhunter –update
[ Rootkit Hunter version 1.3.2 ]

Checking rkhunter data files…
Checking file mirrors.dat                                  [ No update ]
Checking file programs_bad.dat                             [ No update ]
Checking file backdoorports.dat                            [ No update ]
Checking file suspscan.dat                                 [ No update ]
Checking file i18n/cn                                      [ Updated ]
Checking file i18n/en                                      [ No update ]
Checking file i18n/zh                                      [ No update ]
Checking file i18n/zh.utf8                                 [ No update ]
-bash-3.00# /usr/local/bin/rkhunter –versioncheck
[ Rootkit Hunter version 1.3.2 ]

Checking rkhunter version…
This version  : 1.3.2
Latest version: 1.3.2



Here’s a short tutorial on ‘what and how powerful linux is’
The story starts here!

I should mention what GNU/Free software is before explaining Linux

Richard Stallman, who was working in Massachusetts Institute of Technology, came up with the concept of free software in early 1970′s. He always pointed out that the term ‘FREE’,means ‘freedom’, not zero cost.Now that we have some free softwares to work with, but the core of a machine – kernal was still in the hands of microsoft or mac.

After 6 years from this, Linux tourwald, a student of University of Helsinki, made some improvements on ‘Minix’, a linux based operating system developed by Andrew Tanenbaum, and that triggered a new era of free computing! .

unix was not free, which made Massachusetts to create GNU, a modification of unix.Now tourwald have a kernel of its own, and Massachusetts has a set of free programs – GNU.So combining the necessary programs provided by GNU in Cambridge, Massachusetts and a kernel, developed by Linus Torvalds in Helsinki, Finland, Linux was born. Due to the physical distances involved, the means used to get Linus’ kernel together with the GNU programs was the Internet

in late 1991, linux had his kernel clubbed with GNU and started showing people- `what linux is?`
The following lines were enough and more to attract leading developers and programmers to linux

“Are you without a nice project and dying to cut your teeth on an OS you can try to modify for your needs?… This post might just be for you.”

people began writing programs specifically to be run under Linux. Developers began writing drivers so different video cards, sound cards and other gadgets inside and outside your computer could use Linux.

linux had no proper document to install etc in the beginning as it was developed by torwald just as a hobby.This caused less reachebility to ordinary people . Also the writers who wrote about linux werent ‘to the point’.Later, companies like redhat wrapped the needfull components via kernal and GNU programs and an easy to install form.

Linux is available in various flavours – distributions suiting your needs.A number of companies, organizations and individuals have developed their own “versions” of the Linux operating system, known as distributions.

A pretty nice documentation for biginners is available here