question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

apt-get update && apt-get upgrade command failing in buildspec

See original GitHub issue

Describe the bug apt-get -q update 1> /dev/null && apt-get -q upgrade -y 1> /dev/null command failing in buildspec with below error:

COMMAND_EXECUTION_ERROR Message: Error while executing command: apt-get update && apt-get upgrade -y. Reason: exit status 100

Debug logs:

Configuration file '/usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/security/policy/limited/local_policy.jar'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** local_policy.jar (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package java-1.8.0-amazon-corretto-jdk:amd64 (--configure):
 end of file on stdin at conffile prompt
Setting up python2.7-minimal (2.7.17-1~18.04ubuntu1.7) ...
update-binfmts: warning: Couldn't load the binfmt_misc module.
Setting up zlib1g-dev:amd64 (1:1.2.11.dfsg-0ubuntu2.1) ...
Setting up libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.15) ...
Setting up libxml2-utils (2.9.4+dfsg1-6.1ubuntu1.5) ...
Setting up python2.7 (2.7.17-1~18.04ubuntu1.7) ...
Setting up libpython3.6-minimal:amd64 (3.6.9-1~18.04ubuntu1.7) ...
Setting up libpython3.6-stdlib:amd64 (3.6.9-1~18.04ubuntu1.7) ...
Setting up python3.6-minimal (3.6.9-1~18.04ubuntu1.7) ...
update-binfmts: warning: Couldn't load the binfmt_misc module.
Setting up libpython3.6:amd64 (3.6.9-1~18.04ubuntu1.7) ...
Setting up python3.6 (3.6.9-1~18.04ubuntu1.7) ...
Processing triggers for libc-bin (2.27-3ubuntu1.5) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
 java-1.8.0-amazon-corretto-jdk:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Impacted CFCT Version: Confirmed impact on version v2.2.0. Likely to impact older versions too.

  • Impacted CFCT Regions: Confirmed in us-west-2, likely to impact other regions too.

Workaround Insert command : apt-mark hold java-1.8.0-amazon-corretto-jdk in buildspec right before the impacted command: apt-get -q update 1> /dev/null && apt-get -q upgrade -y 1> /dev/null

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:11
  • Comments:6

github_iconTop GitHub Comments

2reactions
snebhu3commented, Apr 21, 2022

We have released v2.3.0 which resolves this issue.

0reactions
Eelvinycommented, Apr 20, 2022

Workaround is good - thanks @snebhu3

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix the AWS code-build apt-get update exit status 100 ...
Worked for me without sudo. Below command worked: curl -sS https://dl.yarnpkg ...
Read more >
Build specification reference for CodeBuild
This topic provides important reference information about build specification (buildspec) files. A buildspec is a collection of build commands and related ...
Read more >
Recent update to Code Deploy now breaking build (we made ...
After further studying of how apt-get update is crashing on the AWS provided container for Nodejs, I saw that a key is expired...
Read more >
"apt-get update" always failed to fetch - Ask Ubuntu
They have been ignored, or old ones used instead. I was tried to using these commands (which found in this question) sudo apt-get...
Read more >
Adding a Build Spec - Seed.run
Check out this example on how to do this. The build spec commands are run at the root of the repo. Each command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found