Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef::Exceptions::Package: No candidate version available for newrelic-php5 #327

Open
murashid786 opened this issue Feb 1, 2018 · 4 comments

Comments

@murashid786
Copy link

Hi,
I am getting the following error while trying to install NewRelic php agent via Chef. I may be adding additional info as I am in the process of trying Python, Ruby, and Java later. I am using CentOS 7, berksfile, and running the command, sudo chef-client --local-mode --runlist 'recipe[newrelic::php_agent]'.

The basic environment info is listed below:

  1. chef client version = 13.6.4
  2. python version and location = usr/bin/python AND 2.7.5
  3. ruby version and location = usr/bin/ruby AND ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
  4. created an empty file, newrelic.ini at /home/centos/chef-repo/newrelic.ini ::: I don't think that it is the right thing to do?
  5. sudo pip install -vvv newrelic command output...
    Using version 2.100.0.84 (newest of versions: 1.13.1.31, 2.0.0.1, 2.2.0.2, 2.2.1.3, 2.4.0.4, 2.6.0.5, 2.8.0.7, 2.10.0.8, 2.10.1.9, 2.12.0.10, 2.14.0.11, 2.16.0.12, 2.18.1.15, 2.20.0.17, 2.20.1.18, 2.22.0.19, 2.22.1.20, 2.24.0.21, 2.26.0.22, 2.26.2.24, 2.28.0.26, 2.30.0.27, 2.32.0.28, 2.34.0.29, 2.36.0.30, 2.38.0.31, 2.38.2.33, 2.40.0.34, 2.42.0.35, 2.44.0.36, 2.46.0.37, 2.48.0.38, 2.50.0.39, 2.52.0.40, 2.54.0.41, 2.56.0.42, 2.58.0.43, 2.58.1.44, 2.58.2.45, 2.60.0.46, 2.62.0.47, 2.64.0.48, 2.66.0.49, 2.68.0.50, 2.70.0.51, 2.72.0.52, 2.72.1.53, 2.74.0.54, 2.76.0.55, 2.78.0.57, 2.80.0.60, 2.80.1.61, 2.82.0.62, 2.82.1.63, 2.84.0.64, 2.86.0.65, 2.86.1.66, 2.86.2.68, 2.86.3.70, 2.88.0.72, 2.88.1.73, 2.90.0.75, 2.92.0.78, 2.94.0.79, 2.96.0.80, 2.98.0.81, 2.100.0.84)
    Using cached wheel link: file:///home/centos/.cache/pip/wheels/13/ef/b3/6c63517df20bcf5dc12a20d653165bfdd654530126a04ab59c/newrelic-2.100.0.84-cp27-none-any.whl
    Installing collected packages: newrelic
    Compiling /tmp/pip-build-Ppq7Nw/newrelic/newrelic/hooks/framework_aiohttp.py ...
    File "/tmp/pip-build-Ppq7Nw/newrelic/newrelic/hooks/framework_aiohttp.py", line 218
    result = yield from coro
    ^
    SyntaxError: invalid syntax

*** Error Info ... by running sudo chef-client --local-mode --runlist 'recipe[newrelic::php_agent]'***
[2018-02-01T19:49:17+00:00] INFO: Running queued delayed notifications before re-raising exception

================================================================================
Error executing action `install` on resource 'newrelic_agent_php[Install]'
================================================================================

Chef::Exceptions::Package
-------------------------
yum_package[newrelic-php5] (/home/centos/.chef/local-mode-cache/cache/cookbooks/newrelic/providers/agent_php.rb line 58) had an error: Chef::Exceptions::Package: No candidate version available for newrelic-php5

Resource Declaration:
---------------------
# In /home/centos/.chef/local-mode-cache/cache/cookbooks/newrelic/recipes/php_agent.rb

  8: newrelic_agent_php 'Install' do
  9:   license NewRelic.application_monitoring_license(node)
 10:   config_file node['newrelic']['php_agent']['config_file'] unless node['newrelic']['php_agent']['config_file'].nil?
@murashid786
Copy link
Author

BTW, php -v gives me 5.4.16 in usr/bin/php

@djoos
Copy link
Member

djoos commented Feb 6, 2018

Hi @murashid786,

re: No candidate version available for newrelic-php5
Even though the resource should handle this internally: would you mind explicitly adding the repository recipe to your run list, prior to the php-agent recipe?

ie. --runlist 'recipe[newrelic::repository], recipe[newrelic::php_agent]'

Thanks in advance for your feedback!
David

@djoos
Copy link
Member

djoos commented Feb 7, 2018

Hi @murashid786,

I spotted your reply in #24 - probably the best way to get to the bottom of the issue you are experiencing would be to push it through test kitchen. You're on Chef 13.6.4 - which exact version of CentOS 7 are you on? (rpm --query centos-release)

Thanks in advance!
David

@murashid786
Copy link
Author

Hi, im running centos-release-7-4.1708.el7.centos.x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants