8.4. APT Package Reference | Error Message Fix

This topic contains 0 replies, has 1 voice, and was last updated by  Christopher 4 months, 4 weeks ago.

  • Author
  • #17294


    Just as a heads up…

    If you’re working through the reading material and running the commands as you go along, you may find that the command:

    ar p /var/cache/apt/archives/apt_1.4~beta1_amd64.deb control.tar.gz | tar -tzf –

    gives you this error:

    no entry control.tar.gz in archive

    gzip: stdin: unexpected end of file
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now


    At first, I realized that my apt_ file was newer. So, first you need to remember to reference your version.

    To find your apt_ file type: ls /var/cache/apt/archives/apt_*

    (Mine was: apt_1.8.1_amd64.deb)

    In theory, you should be able to just plug your file into the command and have it list the metadata. However, the issue now is that control.tar.gz doesn’t exist in some versions of the apt_* file.


    ar p /var/cache/apt/archives/<YOUR_apt_FILE.deb> control.tar.gz | tar -tzf –

    will still return an error…after trying a few things and poking around the file system I realized that the control.tar.gz file is actually zipped as control.tar.xz

    so, you’ll need to type

    ar p /var/cache/apt/archives/<YOUR_apt_FILE.deb> control.tar.xz | tar -tJf –

    (Also note the post pipe change from “tar -tzf” to “tar -tJf” which is explained for dealing with .xz files in the next command in the book right after this one.)

    Hope this helps someone.

    • This topic was modified 4 months, 4 weeks ago by  Christopher.

You must be logged in to reply to this topic.

Back to Top