Technical: Hadoop / Cloudera Distribution : Install Error – can’t open ‘/usr/share/doc/cdh3-repository/cloudera-cdh4.key’: No such file or directory

Have this old machine that I wanted to per-use as a client node for Hadoop; specifically Cloudera’s distribution.

So followed the well lit instruction @

And, all the preparation stuff is going well.  That is until I got to the actual Cloudera Install section:

Here are the folders available for one-click Install:


  • Normally for Ubuntu, one has a choie of Lucid (10.04.x) or Precise (12.04)
  • And, one will generally choose the more recent OS Platform (Precise)
  • But, since my target box is quite a bit old, I will have to go the route of Precise which has CDH has a 32-bit package for

So used wget to download the file:

mkdir -p /downloads/cloudera/cdh/v4/all/ubuntu/x32/

sudo wget -c -O /downloads/cloudera/cdh/v4/all/ubuntu/x32/cdh4-repository_1.0_all.deb

To install package, using dpkg:


sudo dpkg -i /downloads/cloudera/cdh/v4/all/ubuntu/x32/cdh4-repository_1.0_all.deb

cloudera key missing

But, getting the error:

gpg: can't open `/usr/share/doc/cdh3-repository/cloudera-cdh4.key' : No 
such file or directory

Checked to see whether /usr/share/doc/cdh3* exists

ls -la doc folder

And, confirmed that the folder /usr/share/doc/cdh3-repository does not exist

So what to do:

High level:

  • Downloaded archive.key from the latest distro (URL –>
  • Ran apt-key against downloaded file (sudo apt-key add -)
  • The apt-key add command created a new folder (/usr/share/doc/cdh4-repository).  This folder is used for cdh4 (/usr/share/doc/cdh4*)
  • Created a new folder to cdh3-repository (usr/share

Download key

wget -O /tmp/cloudera/key/archive.key

Add Cloudera key

 sudo apt-key add /tmp/cloudera/key/archive.key

Check new folder structure

find  /usr/share/doc/c* -maxdepth 1  -type d

Cloudera - Folder Structure


  • The /usr/share/doc/cdh4-repository folder is present
  • But, /usr/share/doc/cdh3-repository is still missing

Create new folder structure (/usr/share/doc/cdh3-repository)

sudo mkdir -p /usr/share/doc/cdh3-repository

Copy files from /usr/share/doc/cdh3-repository unto /usr/share/doc/cdh4-repository

  sudo cp --recursive /usr/share/doc/cdh4-repository/* /usr/share/doc/cdh3-repository/

Confirm that directory structure is now in place

  find  /usr/share/doc/cdh* -maxdepth 1  -type d

Cloudera - Folder Structure (post changes)

Changes (Short-cut)

Went back and installed package, using dpkg:


sudo dpkg -i /downloads/cloudera/cdh/v4/all/ubuntu/x32/cdh4-repository_1.0_all.deb


Cloudera - cdh4 - Install - Good

And, now we are OK!


References – Debian/Ubuntu – Install – dpkg

References – Debian/Ubuntu – apt

References – Linux – Listing Folders

References – Linux – Copy (cp)

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s