Saturday, September 3, 2011

/usr/bin/ld: cannot find -lglut

/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status
make: *** [etr] Error 1

apt-get install freeglut3-dev

Listing installed packages in ubuntu and centos

You can list installed packages in ubuntu or debian system using following command
#dpkg --get-selections

You can search whether a package is available or not using
#apt-cache search package_name

You can list installed packages in centos or redhat based system using following command
#yum list installed

All the files installed and available
#yum list all
#yum list package_name

Segmentation faultsts... 0% in ubuntu

You may get this error while using apt-get or aptitude

root@test# apt-get  install libogg
Segmentation faultsts... 0%

Files got corrupted in /var/cache/apt

#rm /var/cache/apt/*.bin

Then update aptitude
#aptitude update

If you are using apt-get
#apt-get update

Sometimes you may need a reboot.

Installing phpmyadmin on ubuntu

This post explains how to install and configure phpmyadmin on ubuntu or debian systems.

Install phpmyadmin using apt-get
#apt-get install phpmyadmin

Copy the phpmyadmin apache configuration file to /etc/apache2/conf.d/
#cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/
You can include the configuration file in apache2.conf by adding this line to it
Include /etc/phpmyadmin/apache.conf

No restart apache
#/etc/init.d/apache2 restart

Sometimes you may have to add a blowfish secret to accept cookies.
#vi /var/lib/phpmyadmin/
$cfg['blowfish_secret'] = 'a8b7dafdferHJHJ^&U^45776TIUuiYc6d';

error: 'PIX_FMT_RGBA32' undeclared

You may get this error while installing ffmpeg.
The solution is
#vi /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_frame.c

The thing is you have to replace
 “PIX_FMT_RGBA32″ by  “PIX_FMT_RGB32″ in the file ffmpeg_frame.c
save the file and you can proceed with installation.