Libreadline5-dev does not have apt cache candidate

I am trying to do this with a chef:

package("libreadline5-dev") do package_name "libreadline5-dev" retry_delay 2 retries 0 recipe_name "default" cookbook_name :"nginx-passenger" action :install end 

It gives the following error:

 ================================================================================ Error executing action `install` on resource 'package[libreadline5-dev]' ================================================================================ Chef::Exceptions::Package ------------------------- libreadline5-dev has no candidate in the apt-cache Resource Declaration: --------------------- # In /var/chef/cookbooks/nginx-passenger/recipes/default.rb 15: package "libreadline5-dev" 16: package "build-essential" Compiled Resource: ------------------ # Declared in /var/chef/cookbooks/nginx-passenger/recipes/default.rb:15:in `from_file' 

Versions:

ruby 1.8.7

Chef: 10.16.2

ubuntu: 12.04 (EC2 instance)

Can someone help me fix this? I tried this one , but it did not help to solve the problem.

+4
source share
3 answers

AFAIK, libreadline5-dev no longer included in Ubuntu 12.04.

Instead, you can try libreadline-dev .

+3
source

I had the same problem with the ntp package installed in the ntp cookbook.

After doing

 apt-get check apt-get update chef-client 

in a shell on a debian machine, manually it worked for me, but I could not find out what caused the problem. Maybe someone has an idea?

Hope this helps.

0
source

I am very late to the party, but I did not find any results when looking for this error other than this question. I ran into the same problem and it was caused by the old deprecated apt-get process that kept apt-purge from blocking. You can confirm this by trying apt-get update:

 $ sudo apt-get update E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock the list directory $ ps auxww | grep apt root 23488 0.0 0.0 19408 2336 ? S Jun03 28:42 /usr/bin/apt-get -q -y --force-yes -o Dpkg::Options::=--force-confold update 

after manually killing the apt-get process and performing apt-get update, the chef successfully passed.

0
source

Source: https://habr.com/ru/post/1446598/


All Articles