Announcement

Collapse
No announcement yet.

Problems with installing packages.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problems with installing packages.

    Hi,
    I am relatively new to (K)Ubuntu but not to Linux in general. I have a situation here where whenever I install any package using either Muon or apt, the lock file is not removed after its done. So I get a lot of my Muon sessions just waiting for the lock to be released by the previously used apps.

    Now I always do a 'apt-get clean' and delete the lock file manually every time I run any of these package managers. I am not sure if this is the norm with Kubuntu 13.04, but I was using Ubuntu 12.10 (with Kubuntu-Desktop) which I need not do this...it just worked without having to go through all this hassle.

    This is a clean & fresh install of Kubuntu 13.04.

    Hope someone can help me get this sorted.

    #2
    Next time this happens, open a console window and run:
    Code:
    sudo lsof | grep lock
    This will tell us which running process, if any, is holding the lock file.

    Comment


      #3
      Hi Steve,
      I have run the command that you proposed, I only get locks related to mozilla and others but nothing related to apt.

      Code:
      kblockd     33            root  cwd       DIR                8,7      4096          2 /
      kblockd     33            root  rtd       DIR                8,7      4096          2 /
      kblockd     33            root  txt   unknown                                         /proc/33/exe
      plasma-de 1941           venks  mem       REG              252,1    213904     133130 /usr/lib/libplasmaclock.so.4.10.3.abi3
      plasma-de 1941           venks  mem       REG              252,1     77528     133012 /usr/lib/kde4/plasma_applet_dig_clock.so
      plasma-de 1941 1942      venks  mem       REG              252,1    213904     133130 /usr/lib/libplasmaclock.so.4.10.3.abi3
      plasma-de 1941 1942      venks  mem       REG              252,1     77528     133012 /usr/lib/kde4/plasma_applet_dig_clock.so
      QProcessM 1941 1943      venks  mem       REG              252,1    213904     133130 /usr/lib/libplasmaclock.so.4.10.3.abi3
      QProcessM 1941 1943      venks  mem       REG              252,1     77528     133012 /usr/lib/kde4/plasma_applet_dig_clock.so
      QInotifyF 1941 1945      venks  mem       REG              252,1    213904     133130 /usr/lib/libplasmaclock.so.4.10.3.abi3
      QInotifyF 1941 1945      venks  mem       REG              252,1     77528     133012 /usr/lib/kde4/plasma_applet_dig_clock.so
      QInotifyF 1941 2215      venks  mem       REG              252,1    213904     133130 /usr/lib/libplasmaclock.so.4.10.3.abi3
      QInotifyF 1941 2215      venks  mem       REG              252,1     77528     133012 /usr/lib/kde4/plasma_applet_dig_clock.so
      KCupsConn 1941 2227      venks  mem       REG              252,1    213904     133130 /usr/lib/libplasmaclock.so.4.10.3.abi3
      KCupsConn 1941 2227      venks  mem       REG              252,1     77528     133012 /usr/lib/kde4/plasma_applet_dig_clock.so
      nepomukse 2248           venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      QProcessM 2248 2256      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Thread    2248 2488      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Soprano:: 2248 2492      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Soprano:: 2248 2493      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Soprano:: 2248 2498      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Soprano:: 2248 2499      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Soprano:: 2248 2509      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Thread    2248 2517      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Thread    2248 2798      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      Thread    2248 2799      venks   11wW     REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270           venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2309      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2476      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2487      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2500      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2505      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2507      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      virtuoso- 2270 2800      venks   11w      REG              252,0         0    3672470 /home/venks/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.lock
      firefox   3198           venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Gecko_IOT 3198 3201      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      XPCOM     3198 3202      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Socket    3198 3203      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Hang      3198 3204      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      gdbus     3198 3210      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      JS        3198 3211      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      JS        3198 3212      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      JS        3198 3213      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Timer     3198 3215      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3223      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      DOM       3198 3224      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Cache     3198 3225      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      firefox   3198 3226      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      HTML5     3198 3228      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Cert      3198 3232      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3236      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3238      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Proxy     3198 3239      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      URL       3198 3241      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3251      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3252      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      DOM       3198 3260      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3261      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Image     3198 3279      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      firefox   3198 3286      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Analysis  3198 3296      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Analysis  3198 3297      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      Analysis  3198 3298      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3302      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3303      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      mozStorag 3198 3321      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      DOM       3198 3326      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      firefox   3198 3330      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      DNS       3198 3332      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      DNS       3198 3333      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      DNS       3198 3335      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      StreamTra 3198 3529      venks    6wW     REG              252,0         0    3670276 /home/venks/.mozilla/firefox/rj0bqbt2.default/.parentlock
      As you can see above, there is no apt that is holing the lock file. When I check /var/cache/apt/archives the lock file is there.
      It looks like apt is not cleaning up after itself.

      Comment


        #4
        I also have this nasty habit of apt not removing the cached file after the software is installed. Its eating up my disk space.

        Comment


          #5
          I am currently not running any package manager. Yet take a look:
          Code:
          root@mini2140:~# [B]find /var -iname '*lock*' -ls[/B]
          6029604    0 -rw-r-----   1 root     root            0 Jul 22  2012 /var/cache/apt/archives/lock
          6029508    0 -rw-------   1 root     root            0 Jun  6 00:41 /var/lib/dpkg/triggers/Lock
          6029505    0 -rw-r-----   1 root     root            0 Jun  6 00:41 /var/lib/dpkg/lock
          6029576    0 -rw-r-----   1 root     root            0 Jul 22  2012 /var/lib/apt/lists/lock
          I've never really investigated this before, but it looks like APT never cleans up its lock files. Through some poking around, I've discovered that APT simply puts a lock on the file whenever it needs to. Lock-related errors appear to fall into two buckets:

          * Failing to run the package manager as root
          * Some other process has a lock on the file

          Would you please run the same command I did? Let's see which lock files exist on your system and who the owners are.

          Comment


            #6
            Originally posted by venks View Post
            I also have this nasty habit of apt not removing the cached file after the software is installed. Its eating up my disk space.
            APT doesn't clean out its cache unless you tell it to with sudo apt-get clean.

            Comment


              #7
              Originally posted by SteveRiley View Post
              APT doesn't clean out its cache unless you tell it to with sudo apt-get clean.
              It does if it's configured to do so.

              Comment


                #8
                Originally posted by kubicle View Post
                It does if it's configured to do so.
                Which configuration option would that be? When I looked through man apt.conf, here's what I found, neither of which seems to apply.

                Clean-Installed
                Defaults to on. When turned on the autoclean feature will remove any packages which can no longer be
                downloaded from the cache. If turned off then packages that are locally installed are also excluded
                from cleaning - but note that APT provides no direct means to reinstall them.
                Not the same thing is cleaning everything that's been downloaded.

                When APT is used as a dselect(1) method several configuration directives control the default behaviour.
                These are in the DSelect section.

                Clean
                Cache Clean mode; this value may be one of always, prompt, auto, pre-auto and never. always and prompt
                will remove all packages from the cache after upgrading, prompt (the default) does so conditionally.
                auto removes only those packages which are no longer downloadable (replaced with a new version for
                instance). pre-auto performs this action before downloading new packages.
                apt-get doesn't run in dselect mode anymore.

                Comment


                  #9
                  A valid question Steve. I tend to use Synaptic, which has an option to clean cached packages after installing...but now that I looked at it, it doesn't seem to affect apt configs.

                  My caches are clean though, but I'll check with next upgrade (I'll do that with apt-get to see whether it caches the packages).

                  EDIT: Yes that setting doesn't seem to affect apt-get (though I'm confident it used to sometime in the past :P )

                  One could of course use DPkg::Post-Invoke to run 'apt-get clean' after package installations (although a cron job doing it periodically might be better)
                  Last edited by kubicle; Jun 14, 2013, 02:00 AM.

                  Comment


                    #10
                    Configuring apt

                    man apt.conf

                    NAME
                    apt.conf - Configuration file for APT

                    DESCRIPTION
                    /etc/apt/apt.conf is the main configuration file shared by all the tools in the APT suite of tools, though it is by
                    no means the only place options can be set. The suite also shares a common command line parser to provide a uniform
                    environment...
                    ...
                    PERIODIC AND ARCHIVES OPTIONS
                    APT::Periodic and APT::Archives groups of options configure behavior of apt periodic updates, which is done by the
                    /etc/cron.daily/apt script. See the top of this script for the brief documentation of these options...
                    cat /etc/cron.daily/apt

                    # This file understands the following apt configuration variables:
                    # Values here are the default.
                    # Create /etc/apt/apt.conf.d/02periodic file to set your preference.
                    ...
                    The auto clean interval:
                    # APT::Periodic::AutocleanInterval "0";
                    # - Do "apt-get autoclean" every n-days (0=disable)
                    As default: /etc/apt/apt.conf.d/10periodic
                    APT::Periodic::Update-Package-Lists "0";
                    APT::Periodic:ownload-Upgradeable-Packages "0";
                    APT::Periodic::AutocleanInterval "0";
                    APT::Periodic::Unattended-Upgrade "0";

                    man anacron
                    NAME
                    anacron - runs commands periodically
                    The anacron will execute the script from the /etc/cron.daily, /etc/cron.weekly or /etc/cron.monthly.
                    Last edited by Snowhog; Jun 16, 2013, 11:13 PM.
                    Before you edit, BACKUP !

                    Why there are dead links ?
                    1. Thread: Please explain how to access old kubuntu forum posts
                    2. Thread: Lost Information

                    Comment


                      #11
                      @Rog

                      Doesn't that do "just" autoclean, and not "full" clean?

                      It'll still keep caches from growing indefinitely, though (only keeping current packages in the cache).
                      Last edited by kubicle; Jun 14, 2013, 04:06 AM.

                      Comment


                        #12
                        Doesn't that do "just" autoclean...
                        Yes, you are right - there has been a suggestion: apt-get clean should run weekly ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=160743 ).
                        Before you edit, BACKUP !

                        Why there are dead links ?
                        1. Thread: Please explain how to access old kubuntu forum posts
                        2. Thread: Lost Information

                        Comment


                          #13
                          I installed and use Synaptic now . Synaptic have the option for cleaning up after itself.

                          Apt is also working if I use it to install more than one package but still does not clean automatically. I feel there should be an option in its config files to clean the cache.

                          I have used apt in PCLinuxOS before and it does clean up by default after installing any new package. Perhaps that was a older version of apt.

                          I cannot use Muon for more than one package.

                          Comment


                            #14
                            Originally posted by venks View Post
                            Apt is also working if I use it to install more than one package but still does not clean automatically. I feel there should be an option in its config files to clean the cache.
                            As we've discovered, this ability is not part of APT itself. dselect could tell APT to to clean the entire cache after every operation, but dselect was abandoned some time ago and replaced by Aptitude.

                            Originally posted by venks View Post
                            I have used apt in PCLinuxOS before and it does clean up by default after installing any new package. Perhaps that was a older version of apt.
                            PCLinuxOS is built around APT-RPM, a fork of APT built to work with RPM packages. It could very well be that APT-RPM has extra features not in APT itself.

                            Originally posted by venks View Post
                            I cannot use Muon for more than one package.
                            Your original post doesn't mention any difference in behavior when you use Muon for one package or for multiple packages. Please elaborate.

                            Comment


                              #15
                              Hi Steve,
                              when I use Muon, I can only install one package. After the first package is installed Muon simply does not install anymore selected packages. If always give a notification at the top the the first selected package is installed.

                              Comment

                              Working...
                              X