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

Buildpack fails on Heroku-20 stack with "Package libsensors4 is not available" error #216

Closed
edmorley opened this issue Oct 24, 2020 · 2 comments · Fixed by #223
Closed

Comments

@edmorley
Copy link
Contributor

Hi!

Heroku-20 beta was just released:
https://devcenter.heroku.com/changelog-items/1937

Trying this buildpack on a Heroku-20 app, the build currently fails with:

$ git init
$ h create --stack heroku-20
$ h buildpacks:add https://github.com/DataDog/heroku-buildpack-datadog
$ h buildpacks:add heroku/python
$ touch requirements.txt
$ git add -A && git commit -m '.' && git push heroku main
...
remote: -----> Datadog app detected
remote: -----> Updating apt caches for dependencies
remote:        Get:1 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [81.6 kB]
remote:        Get:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [299 kB]
remote:        Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
remote:        Get:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [107 kB]
remote:        Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
remote:        Get:6 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
remote:        Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
remote:        Get:8 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [428 kB]
remote:        Get:9 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [630 kB]
remote:        Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [784 kB]
remote:        Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [840 kB]
remote:        Fetched 16.2 MB in 4s (4,056 kB/s)
remote:        Reading package lists...
remote: -----> Installing dependencies
remote:        Reading package lists...
remote:        Building dependency tree...
remote:        Package libsensors4 is not available, but is referred to by another package.
remote:        This may mean that the package is missing, has been obsoleted, or
remote:        is only available from another source
remote:        However the following packages replace it:
remote:          libsensors-config
remote:
remote: W: --force-yes is deprecated, use one of the options starting with --allow instead.
remote: E: Package 'libsensors4' has no installation candidate
remote: E: Unable to locate package libsnmp30
remote:  !     Push rejected, failed to compile Datadog app.

It looks like the packages list needs tweaking slightly when $STACK is "heroku-20".

Many thanks :-)

@arapulido
Copy link
Collaborator

Sure, we will work on this. Thanks for reporting!

@edmorley edmorley changed the title Add support for Heroku-20 Buildpack fails on Heroku-20 stack with "Package libsensors4 is not available" error Dec 27, 2020
@edmorley
Copy link
Contributor Author

edmorley commented Dec 28, 2020

For anyone still seeing this error message, check that your app doesn't have a pinned Datadog buildpack version.

ie: Run heroku buildpacks, and check that the https://github.com/DataDog/heroku-buildpack-datadog URL shown doesn't have a version tag specified at the end (ie: a #X.Y.Z suffix).

If it does, overwrite that URL with the recommended version-less one, using:
heroku buildpacks:set --index <number> https://github.com/DataDog/heroku-buildpack-datadog
...where <number> is the number of the existing datadog buildpack in the buildpacks list reported by heroku buildpacks.

(Until #229 / #231 this buildpack's installation instructions unfortunately advised pinning the version, which prevents picking up any buildpack fixes such as Heroku-20 support.)

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

Successfully merging a pull request may close this issue.

2 participants