Whats with the syntax of something followed by parentheses?
From http://jfearn.fedorapeople.org/en-US/RPM/0.1/html/RPM_Guide/ch-advanced-packaging.html:
Scripting languages such as Perl and
Tcl allow for add-on modules. Your
package may require some of these
add-on modules. RPM uses a special
syntax with parenthesis to indicate
script module dependencies. For
example: Requires: perl(Carp) >= 3.2
This indicates a requirement for the
Carp add-on module for Perl, greater
than or equal to version 3.2.
In this case, it is referring to particular features of the rpm library.
error: Failed dependencies:
rpmlib(FileDigests) <= 4.6.0-1 is needed by epel-release-6-5.noarch
rpmlib(PayloadIsXz) <= 5.2-1 is needed by epel-release-6-5.noarch
This suggests you're trying to install the epel-release
rpm on a system for which it was not designed. In fact, in your question, you state you're installing this on CentOS 5, while the package you're attempting to install is designed for CentOS 6 (or RHEL 6). For CentOS 5, you want epel-release-5-4.noarch.rpm. You might want to read the EPEL documentation before you proceed, which would have answered this question as well as others you might have.
Ive tried to use yum so that it can resolve dependencies automatically but it is unable:
Right, because those features aren't available on CentOS 5. From the perspective of yum
you've asked it for magic unicorns. It can't find any.
Bonus points if you tell me how I can fix the public key error.
Install the EPEL signing key. If you read the EPEL documentation -- it's amazing what you'll find there -- you'll get a link to https://fedoraproject.org/keys, which includes instructions on installing the public keys used by the Fedora project.
Sure it seems weird...
Can you boot in rescue mode from the installtion CD ?
If yes, you could use the yum command from the rescue system to reinstall yum on the system...
Yum should have the "installroot" option available so...
Should I try to remember how to do it ?
Best Answer
Use RPMs and stick with RPMs. RPMs are far simpler to use then sourcecode, are easier to update and install security updates, and will will save you time in the long term. I can update all software on my CentOS box in about 5 minutes. It would take hours and hours, perhaps days, to do the same thing when compiling from source.
In addition, since you are new to Linux systems you will want your system to be in line with what the rest of the community uses, so that examples in documentation and forum posts will match what you have available on your local system. The documentation usually assumes that you installed software via RPM. If you have a hybrid system which is built from RPM, but then have a dozen programs installed from sourcecode, debugging will be more difficult and will require more knowledge and skill.
Compiling from source is more complicated and will require you to resolve dependency issues during the compilation. Before you can compile software, you will need to install dependencies such as header files, compilers on the system, and these are often installed via RPM anyways.
However, note that RHEL and CentOS generally stick with one major version of a product (e.g. CentOS5 provides an RPM for PHP 5.3, but will never provide an RPM for 5.4). Security fixes and some feature changes are 'backported' by RedHat into the current version.
Install from source if you want a particular version of the software which is not available from CentOS or if you want to customize the source code by yourself. For starters, try to avoid this.
For ImageMagick, install the RPM provided by CentOS. If it doesn't meet your needs, then research which version you need, and install it from source.
Use yum, which is a wrapper around RPM (the RPM libraries) and does much of the work for you. Again, this will save you time.
RPM is used to install an RPM from a local file, which means you will need to find the RPM and download it and all of it's dependencies. Yum will perform dependency checking, and will download and install the RPM for you.
I prefer it when sourcecode puts the binaries in
/usr/local/bin
and not/usr/bin
./usr/bin
is for software provided by the vendor, and/usr/local/bin
should be reserved for locally compiled packages. If the sourcecode installs the binaries to/usr/bin
, it means that those binaries may get accidentally replaced next time you runyum update --yes
.Also see https://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux
There are other Unix variants which compile all of the software from source, but those systems tend to have good methods and good tools to keep all of those source files organized. FreeBSD is a popular operating system where admins tend to compile software from source packages called 'Ports', and it is a great way to learn about OS and sourcecode.