Coder Social home page Coder Social logo

Package libc6:amd64 not installed about deb2snap HOT 7 OPEN

mikix avatar mikix commented on August 11, 2024
Package libc6:amd64 not installed

from deb2snap.

Comments (7)

bladernr avatar bladernr commented on August 11, 2024

Going to suggest this is not just an AMD64 thing...

I have built deb2snap within a pbuilder armhf environment just as nobuto-m did in the first issue he raised. I then installed isc-dhcp-server and attempted to build a snap from that.

Instead, I get an error like the one nobuto-m saw, only for the armhf port of libc6:

root@klaatu:/deb2snap# ./deb2snap dhcpd
Package libc6:armhf not installed

And likewise, it is installed:

root@klaatu:/deb2snap# apt-cache policy libc6:armhf
libc6:
  Installed: 2.21-0ubuntu4
  Candidate: 2.21-0ubuntu4
  Version table:
 *** 2.21-0ubuntu4 0
        500 http://ports.ubuntu.com/ vivid/main armhf Packages
        100 /var/lib/dpkg/status

from deb2snap.

bladernr avatar bladernr commented on August 11, 2024

Removing the try/except around the addDeps() stuff results in this trace from apt.cache:

root@klaatu:/deb2snap/tools# ./dep-tree libc6:armhf
Adding Deps for libc6:armhf
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apt/cache.py", line 198, in getitem
return self._weakref[key]
File "/usr/lib/python3.4/weakref.py", line 125, in getitem
o = self.datakey
KeyError: 'libc6:armhf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./dep-tree", line 76, in
addDeps(args.packages)
File "./dep-tree", line 56, in addDeps
installedPkg = cache[p].installed
File "/usr/lib/python3/dist-packages/apt/cache.py", line 205, in getitem
raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'libc6:armhf'"

from deb2snap.

bladernr avatar bladernr commented on August 11, 2024

Ok, it's because the packages refer to libc6:ARCH where apt cache actually just refers to it as libc6, which is, I think, exactly what nobuto-m mentioned in the comment he removed:

In [5]: cache['vim'].installed
Out[5]: <Version: package:'vim' version:'2:7.4.052-1ubuntu3'>
In [7]: cache['libc6:amd64'].installed
Out[7]: <Version: package:'libc6' version:'2.19-0ubuntu6.6'>

And leaving $ARCH off the name still works, at least in this instance:\

In [8]: cache['libc6'].installed
Out[8]: <Version: package:'libc6' version:'2.19-0ubuntu6.6'>

from deb2snap.

bladernr avatar bladernr commented on August 11, 2024

FWIW, I fired up python3 in that environment and generated the trace directly:
(Note: this is in a Vivid armhf pbuilder environment on a Trusty amd64 host)

Python 3.4.3 (default, Mar 26 2015, 23:09:09) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt
>>> cache = apt.Cache()
>>> cache['libc6:armhf'].installed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 198, in __getitem__
    return self._weakref[key]
  File "/usr/lib/python3.4/weakref.py", line 125, in __getitem__
    o = self.data[key]()
KeyError: 'libc6:armhf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 205, in __getitem__
    raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'libc6:armhf'"
>>> 

And then tried again with no arch:

>>> cache['libc6'].installed
<Version: package:'libc6' version:'2.21-0ubuntu4'>

from deb2snap.

mikix avatar mikix commented on August 11, 2024

OK, try now. I think all the systems I tried it on were multi-arch-enabled ones. I think it was failing on single-arch systems. Hopefully my code change will help there.

from deb2snap.

bladernr avatar bladernr commented on August 11, 2024

Yep, as discussed on IRC, it builds now on my RPi. Thanks a lot! One suggestion for Launchpad though, if you end up packaging this, you need to add the following at a minimum as dependencies:

make (the instructions list cmake, but at least on some images like the Docker Ubuntu image you turned me on to, make is not installed).

dh-exec (will also pull in debhelper and some others that may also not be installed on some build systems initially).

Of course, that only applies if you are packaging this as a deb, thus far, I've only pulled the bzr and github trees and built from scratch.

from deb2snap.

anthonywong avatar anthonywong commented on August 11, 2024

On amd64, runs 'sudo dpkg --add-architecture i386'. This fixes for me.

from deb2snap.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.