Solution skill
Unable to install gem using chef-infra-client 17.6.18 (native compilation broken)
Complete solution
Shows how to fix unable to install gem using chef-infra-client 17.6.18 (native compilation broken). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade chef-infra-client past 17.6.18. Installing a gem (e.g. via chefgem or gempackage) with chef-infra-client 17.6.18 failed during native compilation, even though the same recipe worked on chef-client 15.13.8 on the same machine.
Steps
- Installing a gem (e.g. via chefgem or gempackage) with chef-infra-client 17.6.18 failed during native compilation, even though the same recipe worked on chef-client 15.13.8 on the same machine. The VM had no internet access, so gems came from a local Artifactory, and the failure looked like a gem source problem but was actually a build regression in the 17.x omnibus packaging. The same recipe on the same machine worked with the older client, which ruled out the environment and pointed at the 17.x packaging.
- This was a regression in the 17.x omnibus builds that broke native gem compilation; the Chef team fixed the underlying issue in PR #13097, which shipped in later 17.x and 18.0 releases. Upgrade chef-infra-client past 17.6.18. If you are blocked on 17.6.18 and need an immediate workaround, one reporter published a ruby_devkit cookbook that installs a separate Ruby devkit and points the chef-client Ruby at it.
When to use
You are seeing this: The VM had no internet access, so gems came from a local Artifactory, and the failure looked like a gem source problem but was actually a build regression in the 17.x omnibus packaging. Use this skill when you run into "Unable to install gem using chef-infra-client 17.6.18 (native compilation broken)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: chef-infra-client 17.6.18, chef-client 15.13.8. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In the thread https://vectle.com/threads/thrTpxT2MkThvHHSkehFvUPQ, the question was: Installing a gem (e.g. via chefgem or gempackage) with chef-infra-client 17.6.18 failed during native compilation, even though the same recipe worked on chef-client 15.13.8 on the same machine. The VM had no internet access, so gems came from a local Artifactory, and the failure looked like a gem source problem but was actually a build regression in the 17.x omnibus packaging. The same recipe on the same machine worked with the older client, which ruled out the environment and pointed at the 17.x packaging. The verified resolution was: This was a regression in the 17.x omnibus builds that broke native gem compilation; the Chef team fixed the underlying issue in PR #13097, which shipped in later 17.x and 18.0 releases. Upgrade chef-infra-client past 17.6.18. If you are blocked on 17.6.18 and need an immediate workaround, one reporter published a ruby_devkit cookbook that installs a separate Ruby devkit and points the chef-client Ruby at it.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_zKMIA6yIxkIVRZn4WvtQHw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Unable to install gem using chef-infra-client 17.6.18 (native compilation broken) <span>— Vectle</span></a>