Packages have unmet dependencies: curl : Depends: libcurl4

Problem: Travis job fails (packages have unmet dependencies)

Hello
Can you assist please with some guidance on how tom resolve gthis problem I see in Travis

Test is below:

(Locally)

git pull
git add .
git push --set-upstream origin runbookUpdate
git commit -m "update to file KB10000011B.md"
make -f P2PMakefile
git push
./updateToGithub 

in GitHub:

  • Create Pull Request
  • Click Details , Travis CI launches
  • Check the log and the Travis job fails with this information at the end of the log:
The following packages have unmet dependencies:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.12) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command "./script/ci-install-dep-build.sh" failed and exited with 100 during .
Your build has been stopped.

This is the fault (above)!

Tried a few things, made a small edited to a runbook:

  • Tried to install bundles locally and push t Github master:

    git pull
    bundle update
    git status
    git add .
    git commit -m "update bundle"
    git push --set-upstream origin runbookUpdate
    git status 
    
  • Looked up the error online:
    This is a possible solution online to the error in the Travis log. (in Ubuntu)
    apt - curl is not working on Ubuntu 18.04 LTS - Ask Ubuntu

  • Looked here to see if I can modify the travis.yml (section before-install)
    to install the missing dependency: Installing Dependencies - Travis CI

Question:
What is the approach here to resolving this issue? Is it required to install the dependency
locally and then push to Github? or is the fault in Travis itself and the dependency has
to be installed somewhere in Travis?

Thank you
Just on the manual apt invocation? Are you referring to the failed Travis makefile update?
How is that run manually? or do I add -o Debug::pkgProblemResolver=yes to the travis.yml in
Github. I am new to Travis. I run it selecting ‘Details’ in the screenshot "travis_build.png"after
I update to the master repo…
I have attached the build config and raw log also.
Thank you for your support.

Hello
The following is output from the modifed script that installs libcurl3. i.e. the script ci-install-dep-build.sh
that is being run had this line:

sudo apt-get -y install curl libc6 libcurl3 zlib1g

which I have changed to:

sudo apt-get -y -o Debug::pkgProblemResolver=yes install curl libc6 libcurl3 zlib1g
I then push the modifed scrript to Github and this is the additional output in the Travis log:
see attached pkgProblemResolver.png

On the apt invocation that fails.


From the build log, the culprit is libcurl3 that you’re installing. It conflicts with libcurl4 that’s required by curl.

Hello
Thank you just a final question. As I am new to GitHub config can you expand on this statement please?

“Usually, this error means that some of the preinstalled conflicting dependency packages have been installed manually and as such, they aren’t being replaced automatically unless you explicitly specify a corresponding replacement dependency”

  1. Where are packages installed manually? on a local branch (local machine) and then pushed to GitHub
    e.g.
    git pull
    bundle update
    git status
    git add .
    git commit -m “update bundle”
    git push

  2. How/where do you explicitly specify a corresponding replacement dependency?
    Thanks

This is not your case. In your case, you yourself specified 2 packages in the same apt install invocation (libcurl3 and curl) that cannot be installed simultaneously.

I was referring to an earlier Travis issue when a package being installed during a job had a dependency that conflicted with a package preinstalled on the build system image (it was installed manually, i.e. with an explicit apt install <package>, during generation of that image).