August 16, 2011 | Posted by
admin | Category: Linux Administration
When you try to install a package using apt-get, APT searches it’s own database for the package name, if the package is available in the database, then it looks for the repository from where to download the package. It then download the package from that repository and installs it.
If the package name does not exist in APT’s database, it does not have any idea what you are trying to install and you see the following error message:
# apt-get install <packagename>
Reading package lists... Done
Building dependency tree... Done
Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package <packagename> has no installation candidate
So, the above error occurs for 2 reasons:
1) The APT’s database is not updated.
A quick fix is to update the APT’s database as per the defined sources list.
# apt-get update
# apt-get upgrade
# apt-get install <packagename>
This is it. If isn’t fixed, check point #2 below.
2) The package itself isn’t available on the official Ubuntu repository.
In such a situation, you have to add a 3rd party repository to your /etc/apt/sources.list file and install the package, however, try such repositories at your own risk.
July 31, 2011 | Posted by
admin | Category: Linux Administration
The Postfix mail logs may indicate the following error when emails are not working:
postdrop: warning: unable to look up public/pickup:
No such file or directory
It turns out to be sendmail running along with Postfix and creating issues. The fix is to stop/remove sendmail and create the necessary postfix directory and restart the postfix service.
# /etc/init.d/sendmail stop
# mkfifo /var/spool/postfix/public/pickup
# /etc/init.d/postfix restart
July 16, 2011 | Posted by
admin | Category: Linux Administration
The alternative / equivalent of chkconfig in Ubuntu is “sysv-rc-conf”. To install sysv-rc-conf, ssh to the server and execute:
# apt-get install sysv-rc-conf
to start managing the services, execute
# sysv-rc-conf
It’s an easy to use interface for managing /etc/rc{runlevel}.d/ symlinks.
sysv-rc-conf provides a graphical view for turning services on and off at startup.
April 30, 2011 | Posted by
admin | Category: Linux Administration
There are various ways to download and install perl modules from CPAN. In general it’s a good idea to download and install the perl module but we will see the different ways of installing the perl module.
Method 1. The easiest way is to use the perl CPAN module. SSH to the server as root and execute:
# cpan
if you are running this for the first time, it will prompt you for a few questions (default answers are fine) before providing you with the “cpan >” prompt. To install a module, say for example “Perl::OSType”, execute
cpan > install Perl::OSType
this will download and compile the module and install it server wide. To know more commands/options of cpan, type question mark ( ? ) at the cpan prompt.
Method 2. The second and the quickest method is to use perl CPAN module from the bash prompt instead of ‘cpan’ prompt. If you are on the command line of Linux, just execute
# perl -MCPAN -e 'install Perl::OSType'
Method 3. The above 2 methods are the easiest one but it is recommended to install the module manually as the above methods may not always work.
Search and download the module from http://search.cpan.org/ and then wget it on your server. Once done, extract it:
# tar -zxf Perl-OSType-1.002.tar.gz
Untar the downloaded file and go to the extracted directory. There is a README file inside the directory with the installation steps, however, here are they:
# perl Makefile.PL
# make
# make test
# make install
That is it.
February 27, 2011 | Posted by
admin | Category: Linux Administration
You may receive the “configure: error: Ogg needed” while installing libogg which indicates some missing devel packages related to Ogg. The complete error message is as follows:
Could not run Ogg test program, checking why...
The test program compiled, but did not run.
This usually means that the run-time linker is not finding Ogg
or finding the wrong version of Ogg. configure: error: Ogg needed!
This requires the installation of libogg and libvorbis devel package which is available with yum. SSH to the server as root and install the packages
# yum install libogg-devel libvorbis libvorbis-devel
Once done, you will be able to install libogg package.