Solving Error “open of DOCTYPE failed: No such file or directory” When Using rpm -i

My Problem:

Attempting to install an RPM using the rpm -i command causes a series of errors:

error: open of <!DOCTYPE failed: No such file or directory
error: open of HTML failed: No such file or directory
error: open of PUBLIC failed: No such file or directory

The shell may hang and not return control to you.

It looks like it’s trying to parse an HTML document as a series of commands. Let’s think about that for a moment, shall we?

The Solution:

You are not attempting to install an rpm file, you are attempting to install a web page. Most likely either a redirect or 404 error page. Don’t believe me? Use cat to view the rpm file. In my case, trying to install rpmforge as a repo, I used curl to get what I thought was the proper rpm, however in reality I was retrieving the following:

$ cat rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
<title>302 Found</title>
<p>The document has moved <a href="">here</a>.</p>
<address>Apache/2.2.3 (Red Hat) Server at Port 80</address>

Once you find the proper RPM file, I’m sure the installation will proceed without a hitch.


  1. furicle

    April 23, 2012 at 11:11 am

    wget follows redirects….


    • Wesley David

      April 23, 2012 at 2:16 pm

      curl can to, but I’m not keen on auto-following redirects.


  2. DakuTenshi

    February 27, 2013 at 1:59 am

    Thank you, I feel dumb now :).


Leave a Reply

Follow TheNubbyAdmin!

follow us in feedly

Raw RSS Feed:

Contact Me!

Want to hire me as a consultant? Have a job you think I might be interested in? Drop me a line:

Contact Me!

Subscribe via Email

Your email address is handled by Google FeedBurner and never spammed!

The Nubby Archives

Circle Me on Google+!

Photos from Flickr

Me on StackExchange

The IT Crowd Strava Group

%d bloggers like this: