X

Linode-CLI HomeBrew – Fix File Not Found During Installation

This site and all of my others are hosted on a lovely 12GB Linode instance in London. As I’ve been messing around with API’s more and more recently, I discovered that Linode has made their own command line interface utility that’s available in part via OS X (macOS) HomeBrew.

Unfortunately, as of writing this, their brew tap adds a ruby file that declares it needing an old version of CPAN-Meta-YAML-0.012.tar.gz that doesn’t exist anymore and you’ll get something along the lines of:

Error: Failed to download resource "linode-cli--CPAN::Meta::YAML"
Download failed: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-YAML-0.012.tar.gz

The fix is to edit the ruby file with a later version of the file that does exist, along with its SHA1 hash underneath.

 

The file to edit is located in /usr/local/Library/Taps/linode/homebrew-cli/linode-cli.rb. Scroll down to:

resource 'CPAN::Meta::YAML' do

 

Edit the below URL from:

url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-YAML-0.012.tar.gz'

to:

url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-YAML-0.018.tar.gz'

 

Edit the below SHA1 from:

sha1 'a8dcaccedf8ebf56667289f12d76c05bff8379da'

to:

sha1 'e540fc207c0ace3041abfec2c90cf54d510ce9fa'

 

Do the same for the following, from:

resource 'Parse::CPAN::Meta' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Parse-CPAN-Meta-1.4414.tar.gz'
  sha1 'a6499fe30e87cfcf71a0f77adb4083bbf4b0429e'
end

to:

resource 'Parse::CPAN::Meta' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Parse-CPAN-Meta-1.4422.tar.gz'
  sha1 '3f96ecfbeab892d6c309aa5d7510d3df190f50b3'
end`

 

And again, from:

resource 'CPAN::Meta::Requirements' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-Requirements-2.125.tar.gz'
  sha1 '1d0d20024c531354094ca9a1609fad694b8db7d3'
end

to:

resource 'CPAN::Meta::Requirements' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-Requirements-2.140.tar.gz'
  sha1 '8dad15fa876859a175680550fe68dc09e9f3c118'
end

 

And again, from:

resource 'CPAN::Meta' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-2.140640.tar.gz'
  sha1 'f612221e15f654c2a5994699873a0881e71c3c3c'
end

to:

resource 'CPAN::Meta' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Meta-2.150005.tar.gz'
  sha1 '2d75030bc177dedc98cc2cbd396d98943da5f86b
end

 

And again, from:

resource 'Perl::OSType' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Perl-OSType-1.007.tar.gz'
  sha1 'b04781569df225919440d1ca4124c835457c8910'
end

to:

resource 'Perl::OSType' do
  url 'http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Perl-OSType-1.010.tar.gz'
  sha1 '55f74bc6b5462d6a628f396166150f683c34a039'
end

 

Last one, from:

resource 'ExtUtil' do
  url 'http://www.cpan.org/authors/id/A/AM/AMBS/ExtUtils/ExtUtils-CBuilder-0.280216.tar.gz'
  sha1 'f13c42bbe82ed3e1d99649624c10f3da3c171c13'
end

to:

resource ‘ExtUtil’ do
  url ‘http://www.cpan.org/authors/id/A/AM/AMBS/ExtUtils-CBuilder-0.280224.tar.gz’
  sha1 ‘5dc79083f031fcb2d1e989e0bc00526885d851f7’
end

Save the file and try again. Hopefully, Linode will fix this shortly, they also need to update the ruby file to use sha256 also, I may do this in the future if I’m ever utterly bored.

Ed:

View Comments (2)

  • Seems like you also need to replace ExtUtil with the following now:

    resource 'ExtUtil' do
    url 'http://www.cpan.org/authors/id/A/AM/AMBS/ExtUtils-CBuilder-0.280224.tar.gz'
    sha1 '5dc79083f031fcb2d1e989e0bc00526885d851f7'
    end

    Don't know if that ruins something but the install finished :D

Related Post

This website uses cookies.