Menu

#4676 Debian 8: Software Packages "Package is no longer installed"

1.760
closed-fixed
nobody
None
5
2016-02-19
2015-11-11
No

The issue was reported to me by a TurnKey Linux user.
thread on TurnKey forums: http://www.turnkeylinux.org/forum/support/20151001/file-server-appliance14-webmin-not-working#comment-24294
issue on TurnKey tracker issue tracker: https://github.com/turnkeylinux/tracker/issues/493

As reported here: https://virtualmin.com/node/38076

Webmin --> System --> Software Packages --> Package Tree

When any of the packages are clicked on; it raises an error: "Package is no longer installed"; however I can confirm from the commandline that the packages are definitely there.

I did discover that we there is a dependancy mssing; namely apt-show-versions but even after installing that (and it's dependency) the problem remains. All dependencies (as listed http://www.webmin.com/deb.html) are now installed.

Is there a new dependency for this to work in Jessie?

Discussion

  • Jamie Cameron

    Jamie Cameron - 2015-11-12

    I just did a test on a fresh install of Debian Jessie, and the package tree worked just fine.

    Did you test this with Webmin 1.770?

     
  • Jeremy Davis

    Jeremy Davis - 2015-11-12

    Thanks for your quick response Jamie.

    I removed the version I had (apt-get purge webmin*) and installed your webmin_1.770_all.deb package and the issue still exists.

    Although perhaps I need to explain more/better. The package tree works fine, it's when you actually click on any of the packages that the error occurs. I will attach screenshots to hoepfully help explain.

     
  • Jamie Cameron

    Jamie Cameron - 2015-11-12

    Right, I understand the probem - but on my test system, clicking on a package works fine.

     
  • Jamie Cameron

    Jamie Cameron - 2015-11-12

    At the shell prompt if you run dpkg --list XYZ where XYZ is the package name, what does it output?

     
  • Jeremy Davis

    Jeremy Davis - 2015-11-12

    Hmm, must be a missing dependency then...

    FWIW I will use the package acl as it is the on that the screenshot above is for.

    So here is what dpkg --list aclreturns:

    # dpkg --list acl
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                Version        Architecture   Description
    +++-===================-==============-==============-===========================================
    ii  acl                 2.2.52-2       amd64          Access control list utilities
    
     
  • Jamie Cameron

    Jamie Cameron - 2015-11-12

    Also, what output do you get if you run dpkg --print-avail acl

     
  • Jeremy Davis

    Jeremy Davis - 2015-11-12

    Hmmm... Might be something...

    # dpkg --print-avail acl
    dpkg-query: package 'acl' is not available
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    
     
  • Jeremy Davis

    Jeremy Davis - 2015-11-12

    Ok it looks like Webmin depends on dselect.

    apt-get install dselect && dselect update

    and the issue is resolved.

    Is this an expected dependancy?

     
  • Jamie Cameron

    Jamie Cameron - 2015-11-13

    That's surprising - was this a completely fresh Debian install, or did you remove the dselect package?

     
  • Jeremy Davis

    Jeremy Davis - 2015-11-16

    This is TurnKey Linux v14.0. It is essentially a minimalist Debian Jessie with only the essentials (and a few custom extras - one of which is Webmin).

    Thanks for your help working this out.

    Out of interest is there a reason why you don't just use apt (e.g. apt-cache show) to get this info rather than using using dselect via dpkg?

     

    Last edit: Jeremy Davis 2015-11-16
  • Jamie Cameron

    Jamie Cameron - 2015-11-16

    We use dpkg becuase in theory the package management system (dpkg) is seperate from the update system (apt).

     
  • Jeremy Davis

    Jeremy Davis - 2016-02-17

    After much digging it appears that dselect is not actually required afterall, although manually running deselect update from time to time is the easiest way to keep dpkg's list of packages up to date. They are a completely separate to apt's list of packages.

    It is possible to leverage the lists that apt-get update has already downloaded though and I have created an apt hook to update the dpkg list from these everytime apt-get update is run:

    # cat /etc/apt/apt.conf.d/05update-dpkg 
    APT::Update::Post-Invoke {"dpkg --clear-avail; echo -n 'Updating dpkg package lists'; for LIST in $(ls /var/lib/apt/lists/*Packages); do echo -n '.'; dpkg --merge-avail $LIST >/dev/null; done; echo"};
    

    TBH I'm surprised that other Debian users have not come across this issue as dselect is not a "required", "important" or "standard" package (at least not in Jessie) so I imagine that only users who have upgraded from a previous version will have it installed. Apparently in previous versions it was a pre-depends of dpkg - not sure when that changed.

    Also FWIW the dpkg man page says:

    -p, --print-avail package-name...
        Display details about package-name, as found in
        /var/lib/dpkg/available. Users of APT-based frontends
        should use apt-cache show package-name instead.
    

    Seeing as Webmin uses apt for package management, the last sentence suggests to me that Webmin should be using apt-cache show <package-name> instead of dpkg --print-avail <package-name>.

    Also my research suggests that even if everything appears to be working properly, unless the user manually updates the dpkg/dselect package lists then they will become stale over time.

    So IMO Webmin either needs to use apt-cache show, provide a button to run dselect update or update the dpkg package list similar to the way my apt hook does.

     

    Last edit: Jeremy Davis 2016-02-17
  • Jamie Cameron

    Jamie Cameron - 2016-02-18

    Webmin only uses the dpkg --print-avail command to show the details of an installed package though. Can this really get out of sync with what is actually installed?

     
  • Jeremy Davis

    Jeremy Davis - 2016-02-18

    I understand that, but unless you are (creating and) updating the dpkg package lists (either via manually running dselct update or the trick that I discovered and noted above) then the information does not exist or will become out of date (until you manually update it). TBH I'm not sure how this worked before? But it doesn't appear to be working the way you intend now in Debian Jessie.

    Seeing as you are already using apt then using apt-cache show (as recommended in the dpkg man page) would be a much more robust solution and would still be backwards compatible. The apt package lists are easily updated (via the Webmin button in the software module) so just swapping the command that Webmin uses should do the trick nicely.

     
  • Jamie Cameron

    Jamie Cameron - 2016-02-18

    Does using apt-cache show imply that APT is always being used as a package installer, which may not necessarily be the case? Debian packages can exist and be installed without using APT at all.

     
  • Jeremy Davis

    Jeremy Davis - 2016-02-19

    Not neccessarily. apt-cache show package will show the version installed and any other versions available from the repositories (if they differ). dpkg --preint-avail will only show package info of dpkg -i installed packages after you have run dselect update.

    To clearly demonstrate this:

    root@tkldev ~# apt-cache policy webmin
    webmin:
      Installed: 1.760-turnkey+0
      Candidate: 1.760-turnkey+0
      Version table:
     *** 1.760-turnkey+0 0
            999 http://archive.turnkeylinux.org/debian/ jessie/main amd64 Packages
            100 /var/lib/dpkg/status
    

    So v1.760 is installed and is the latest availble version from the repos.

    root@tkldev ~# dpkg --print-avail webmin
    dpkg-query: package 'webmin' is not available
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    

    dselect is installed but the dselect/dpkg package lists have not been updated. So it's not showing any packages.

    root@tkldev ~# apt-cache show webmin
    Package: webmin
    Priority: optional
    Section: admin
    Installed-Size: 8089
    Maintainer: Alon Swartz <alon@turnkeylinux.org>
    Architecture: all
    Version: 1.760-turnkey+0
    Depends: libnet-ssleay-perl, openssl, libauthen-pam-perl, libpam-runtime, libio-pty-perl
    Pre-Depends: perl
    Filename: pool/jessie/main/w/webmin/webmin_1.760-turnkey+0_all.deb
    Size: 1658420
    MD5sum: 0db4de7608dcd5260555d765203a2e80
    SHA1: 7c82b853f8b618b56cc2147905eb77944bbe7c61
    SHA256: eab5e5757a78ab59822ee874d4cfa6e9b8ea5c9a4d6f887f09c30cd54702f70e
    SHA512: cd7075729d85fc06be5feafe1ede1ef7301c37f499d90ff9ff87531c919c260778c5cf3b7580c166d42948d63d42023e5aa504f87bdcb0039b74d58b7915fa8c
    Description: A web-based administration interface for Unix systems.
     Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems
     and more using your web browser.  After installation, enter the URL
     https://localhost:10000/ into your browser and login as root with your
     root password.
    Description-md5: 964ab8ea0954bc3bcc20e25a55e7c0aa
    

    apt-cache show shows the currently installed package. If webmin weren't installed then it would still show this same info as the info is drawn from both the package repos (collected during apt-get update) and installed packages.

    root@tkldev ~# dselect update
    Hit http://security.debian.org jessie/updates InRelease
    Hit http://security.debian.org jessie/updates/main amd64 Packages
    Hit http://security.debian.org jessie/updates/contrib amd64 Packages 
    Ign http://archive.turnkeylinux.org jessie-security InRelease
    Hit http://security.debian.org jessie/updates/contrib Translation-en  
    Hit http://security.debian.org jessie/updates/main Translation-en
    Ign http://archive.turnkeylinux.org jessie InRelease                  
    Hit http://archive.turnkeylinux.org jessie-security Release.gpg
    Ign http://http.debian.net jessie InRelease                 
    Hit http://archive.turnkeylinux.org jessie Release.gpg      
    Hit http://archive.turnkeylinux.org jessie-security Release
    Hit http://http.debian.net jessie Release.gpg
    Hit http://archive.turnkeylinux.org jessie Release
    Hit http://http.debian.net jessie Release
    Hit http://archive.turnkeylinux.org jessie-security/main amd64 Packages
    Hit http://http.debian.net jessie/main Sources
    Hit http://http.debian.net jessie/contrib Sources
    Hit http://archive.turnkeylinux.org jessie/main amd64 Packages    
    Hit http://http.debian.net jessie/main amd64 Packages
    Hit http://http.debian.net jessie/contrib amd64 Packages
    Hit http://http.debian.net jessie/contrib Translation-en
    Hit http://http.debian.net jessie/main Translation-en              
    Ign http://archive.turnkeylinux.org jessie-security/main Translation-en
    Ign http://archive.turnkeylinux.org jessie/main Translation-en
    Reading package lists... Done
    Merging available information
    Replacing available packages info, using /var/cache/apt/available.
    Information about 42647 packages was updated.
    
    root@tkldev ~# dpkg --print-avail webmin
    Package: webmin
    Priority: optional
    Section: admin
    Installed-Size: 8089
    Maintainer: Alon Swartz <alon@turnkeylinux.org>
    Architecture: all
    Version: 1.760-turnkey+0
    Depends: libnet-ssleay-perl, openssl, libauthen-pam-perl, libpam-runtime, libio-pty-perl
    Pre-Depends: perl
    Filename: pool/jessie/main/w/webmin/webmin_1.760-turnkey+0_all.deb
    Size: 1658420
    MD5sum: 0db4de7608dcd5260555d765203a2e80
    Description: A web-based administration interface for Unix systems.
     Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems
     and more using your web browser.  After installation, enter the URL
     https://localhost:10000/ into your browser and login as root with your
     root password.
    SHA1: 7c82b853f8b618b56cc2147905eb77944bbe7c61
    SHA256: eab5e5757a78ab59822ee874d4cfa6e9b8ea5c9a4d6f887f09c30cd54702f70e
    SHA512: cd7075729d85fc06be5feafe1ede1ef7301c37f499d90ff9ff87531c919c260778c5cf3b7580c166d42948d63d42023e5aa504f87bdcb0039b74d58b7915fa8c
    

    Once the dselect/dpkg package lists have been updated then it shows essentially the same info as apt-cache show.

    root@tkldev ~# dpkg -i webmin_1.780-turnkey+0_all.deb 
    (Reading database ... 42225 files and directories currently installed.)
    Preparing to unpack webmin_1.780-turnkey+0_all.deb ...
    Unpacking webmin (1.780-turnkey+0) over (1.760-turnkey+0) ...
    Setting up webmin (1.780-turnkey+0) ...
    update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
    insserv: warning: current start runlevel(s) (empty) of script `webmin' overrides LSB defaults (2 3 4 5).
    insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `webmin' overrides LSB defaults (0 1 6).
    Processing triggers for systemd (215-17+deb8u2) ...
    

    So now I have just manually installed a newer version (that is not available from the repos).

    root@tkldev ~# dpkg --print-avail webmin
    Package: webmin
    Priority: optional
    Section: admin
    Installed-Size: 8089
    Maintainer: Alon Swartz <alon@turnkeylinux.org>
    Architecture: all
    Version: 1.760-turnkey+0
    Depends: libnet-ssleay-perl, openssl, libauthen-pam-perl, libpam-runtime, libio-pty-perl
    Pre-Depends: perl
    Filename: pool/jessie/main/w/webmin/webmin_1.760-turnkey+0_all.deb
    Size: 1658420
    MD5sum: 0db4de7608dcd5260555d765203a2e80
    Description: A web-based administration interface for Unix systems.
     Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems
     and more using your web browser.  After installation, enter the URL
     https://localhost:10000/ into your browser and login as root with your
     root password.
    SHA1: 7c82b853f8b618b56cc2147905eb77944bbe7c61
    SHA256: eab5e5757a78ab59822ee874d4cfa6e9b8ea5c9a4d6f887f09c30cd54702f70e
    SHA512: cd7075729d85fc06be5feafe1ede1ef7301c37f499d90ff9ff87531c919c260778c5cf3b7580c166d42948d63d42023e5aa504f87bdcb0039b74d58b7915fa8c
    

    v1.760 is no longer installed but dpkg --print-avail is still only showing the info from the last time it's info was updated.

    root@tkldev ~# apt-cache show webmin
    Package: webmin
    Status: install ok installed
    Priority: optional
    Section: admin
    Installed-Size: 8161
    Maintainer: Alon Swartz <alon@turnkeylinux.org>
    Architecture: all
    Version: 1.780-turnkey+0
    Depends: libnet-ssleay-perl, openssl, libauthen-pam-perl, libpam-runtime, libio-pty-perl
    Pre-Depends: perl
    Conffiles:
     /etc/init.d/webmin 61c4186790d5594a6d070bc08b91d43c
     /etc/pam.d/webmin 7d80c86adbd36eeb8f220b9efdd30819
    Description: A web-based administration interface for Unix systems.
     Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems
     and more using your web browser.  After installation, enter the URL
     https://localhost:10000/ into your browser and login as root with your
     root password.
    Description-md5: 964ab8ea0954bc3bcc20e25a55e7c0aa
    
    Package: webmin
    Priority: optional
    Section: admin
    Installed-Size: 8089
    Maintainer: Alon Swartz <alon@turnkeylinux.org>
    Architecture: all
    Version: 1.760-turnkey+0
    Depends: libnet-ssleay-perl, openssl, libauthen-pam-perl, libpam-runtime, libio-pty-perl
    Pre-Depends: perl
    Filename: pool/jessie/main/w/webmin/webmin_1.760-turnkey+0_all.deb
    Size: 1658420
    MD5sum: 0db4de7608dcd5260555d765203a2e80
    SHA1: 7c82b853f8b618b56cc2147905eb77944bbe7c61
    SHA256: eab5e5757a78ab59822ee874d4cfa6e9b8ea5c9a4d6f887f09c30cd54702f70e
    SHA512: cd7075729d85fc06be5feafe1ede1ef7301c37f499d90ff9ff87531c919c260778c5cf3b7580c166d42948d63d42023e5aa504f87bdcb0039b74d58b7915fa8c
    Description: A web-based administration interface for Unix systems.
     Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems
     and more using your web browser.  After installation, enter the URL
     https://localhost:10000/ into your browser and login as root with your
     root password.
    Description-md5: 964ab8ea0954bc3bcc20e25a55e7c0aa
    

    Whereas, with no further configuration or update (i.e. no apt-get update) apt is already aware that there has been a new package version installed. It then goes on to show other versions available from the repos (i.e. info collected from the repos last time that apt-get update was run).

    root@tkldev ~# dselect update         
    Hit http://security.debian.org jessie/updates InRelease  
    ....
    Ign http://archive.turnkeylinux.org jessie/main Translation-en                                        
    Reading package lists... Done                                                                         
    Merging available information
    Replacing available packages info, using /var/cache/apt/available.
    Information about 42647 packages was updated.
    
    root@tkldev ~# dpkg --print-avail webmin
    Package: webmin
    Priority: optional
    Section: admin
    Installed-Size: 8161
    Maintainer: Alon Swartz <alon@turnkeylinux.org>
    Architecture: all
    Version: 1.780-turnkey+0
    Depends: libnet-ssleay-perl, openssl, libauthen-pam-perl, libpam-runtime, libio-pty-perl
    Pre-Depends: perl
    Description: A web-based administration interface for Unix systems.
     Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems
     and more using your web browser.  After installation, enter the URL
     https://localhost:10000/ into your browser and login as root with your
     root password.
    

    Once we update the dselect/dpkg package lists, then dpkg --print-avail is aware of the new package (and only shows that).

    I wold argue that the above demonstrates that apt-cache show package is a superior way to get the relevant package info. For Webmin's purposes though the apt-cache show package output would need to be cleaned so that it only provides the first entry (which would either be the currently installed package info or the latest version from the repos).

     
  • Jamie Cameron

    Jamie Cameron - 2016-02-19

    Thanks for the detailed explanation - I will fix Webmin in the next release to use apt-cache show instead.

     
  • Jamie Cameron

    Jamie Cameron - 2016-02-19
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.