Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a RHEL 6 server without any internet access that is missing a cron installation.

I am tyring to install crontabs like this but i get this error:

[root@netsrvr01 cron.d]# rpm -ivh /Downloads/crontabs-1.10-33.el6.noarch.rpm
warning: /Downloads/crontabs-1.10-33.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
        /etc/cron.d is needed by crontabs-1.10-33.el6.noarch
[root@netsrvr01 cron.d]# Error: 'NoneType' object has no attribute 'sendline'

What does it mean /etc/cron.d is needed? I do have those directories and I am logged in as root. Unfortunately i don't have a similar machine I can use yum downloader for either.

Edit: RPM contents:

[root@netsrvr01 Downloads]# rpm -qpl /Downloads/crontabs-1.10-33.el6.noarch.rpm
warning: /Downloads/crontabs-1.10-33.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts
/usr/share/man/man4/crontabs.4.gz
share|improve this question
    
Can you provide the contents of this RPM? rpm -qpl /Downloads/crontabs-1.10-33.el6.noarch.rpm. –  slm Jun 17 '13 at 19:11
    
@slm rpm contents have been added. thank you for your help –  Quinma Jun 17 '13 at 19:53

2 Answers 2

up vote 1 down vote accepted

Idea #1 - directory already exists

Try running the command rpm -Uvh --test /Downloads/crontabs-1.10-33.el6.noarch.rpm first to see if it reports anything out of the ordinary. If not then do an upgrade of this package instead of an install.

I believe it's complaining because this directory already exists, but it's unclear by whom. On my CentOS 6 boxes this directory shows as being owned by the package cronie.

$ rpm -qf /etc/cron.d
cronie-1.4.4-7.el6.x86_64

When I look at the contents of the crontabs package I see the following content:

$ repoquery -l crontabs
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts
/usr/share/man/man4/crontabs.4.gz

Notice there is no /etc/cron.d. If you run the following command however you'll see that crontabs requires the following resources:

$ rpm -qp --requires crontabs-1.10-33.el6.noarch.rpm 
/bin/bash  
/etc/cron.d  
config(crontabs) = 1.10-33.el6
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

Idea #2 - verify cronie package

So this is where the requirement is coming from. I would run the following command to confirm that the package cronie is correctly installed:

$ rpm -V cronie --verbose
.........    /etc/cron.d
.........    /etc/cron.d/0hourly
.........  c /etc/cron.deny
.........  c /etc/pam.d/crond
.........    /etc/rc.d/init.d/crond
.........  c /etc/sysconfig/crond
.........    /usr/bin/crontab
.........    /usr/sbin/crond
.........    /usr/share/doc/cronie-1.4.4
.........  d /usr/share/doc/cronie-1.4.4/AUTHORS
.........  d /usr/share/doc/cronie-1.4.4/COPYING
.........  d /usr/share/doc/cronie-1.4.4/ChangeLog
.........  d /usr/share/doc/cronie-1.4.4/INSTALL
.........  d /usr/share/doc/cronie-1.4.4/README
.........  d /usr/share/man/man1/crontab.1.gz
.........  d /usr/share/man/man5/crontab.5.gz
.........  d /usr/share/man/man8/cron.8.gz
.........  d /usr/share/man/man8/crond.8.gz
.........    /var/spool/cron
share|improve this answer
    
@Quinma - see additions to my answer. –  slm Jun 17 '13 at 20:06
1  
@Quinma - If you want you can get the installation disk and just manually scp the crontabs file to your remote server. –  slm Jun 17 '13 at 20:08
    
@Quinma - what was the actual issue? –  slm Jun 17 '13 at 20:11
    
idea #2 is the issue, cronie is not installed correctly and I need to use the idea from #1 in order to get that installed correctly. This server is a mess and your shared knowledge on package resources will help me get to the bottom of it. –  Quinma Jun 17 '13 at 20:17

If you have the installation disc, you may want to try to do a repair if the disc provides that feature. Or, you may try to install all of the cron packages from the installation disc.

share|improve this answer
    
That is a good answer, unfortunately in my case the server is remote –  Quinma Jun 17 '13 at 19:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.