Announcement

Collapse
No announcement yet.

APT - accidentally removed together with a bunch of dependencies

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

    APT - accidentally removed together with a bunch of dependencies

    The WARNING is in a last post at the end of this discussion.
    Please check it out. Do not make the same mistake I made.




    In the process of getting the Franklin U600 Wimax modem to work with Kubuntut 12.10 I accidentally rid my installation of 'apt", the entire folder, together with a bunch of dependencies. Computer boots, logs me in and then presents me with a beautiful blue screen!

    I have the source code for 12.10 with a number of 'aptdaemon' tarballs. I can access the remnants of 12.10 from my 12.04 installation.

    My question: What is the best way of re-installing apt and associated files and directories?
    I tried to use the aptdaemon tarballs to extract and install them. Lots of text scrolling, lots of activities - but little results.

    The cleanest solution would be to reinstall 12.10 from scratch. But the image is over 900 Mb and I have only a CD drive, no DVD.

    Now what?

    May I please have some input?
    Thank you.
    Last edited by PJJ; Oct 15, 2012, 11:22 AM. Reason: Problem almost solved

    #2
    It might be possible to chroot into the 12.10 installation from a booted Live CD, if you have one (apparently not Kubuntu 12.10), and then reinstall apt from the chroot. I dunno -- sounds kinda like changing a piston in a running car. A higher confidence approach would be to reinstall -- can you made a Live USB stick with your image?

    Comment


      #3
      Here is a link for kpackagekit deb download. Maybe that will help. Not sure.

      http://pkgs.org/ubuntu-12.04/ubuntu-...1_all.deb.html

      Comment


        #4
        Originally posted by PJJ View Post
        In the process of getting the Franklin U600 Wimax modem to work with Kubuntut 12.10 I accidentally rid my installation of 'apt", the entire folder, together with a bunch of dependencies.
        Which folder do mean? /etc/apt, or /var/lib/apt, or something else?

        Originally posted by PJJ View Post
        I have the source code for 12.10 with a number of 'aptdaemon' tarballs. I can access the remnants of 12.10 from my 12.04 installation.
        aptdaemon is not the core of the APT package management system. The apt package contains the important utilities. You can download the package directly from Ubuntu and install it with dpkg.

        Comment


          #5
          Originally posted by dibl View Post
          It might be possible to chroot into the 12.10 installation from a booted Live CD, if you have one (apparently not Kubuntu 12.10), and then reinstall apt from the chroot. I dunno -- sounds kinda like changing a piston in a running car. A higher confidence approach would be to reinstall -- can you made a Live USB stick with your image?
          I have the 12.04 installation CD that I may be able to use to repair the bad 12.10.

          Unfortunately I have not been able to make a USB stick that does really boot on my computer. I have an 'ancient' Toshiba Satellite A-45. I believe it does not allow booting from a USB stick. If it could be made to do so, it would trigger another full roun d of potential disasters. And I already got two on my hand!

          But I can use 12.04 to boot and then go into the damaged 12.10 installation (using sudo or su) and manipulate from there. Does that help?

          Comment


            #6
            If you can follow SteveRiley's suggestion, and it happens to work, that would be the best first thing to try, since reinstalling sounds problematic. Go to the link he posted, download the .deb file for your architecture -- 32-bit, I guess, and use "sudo dpkg -i apt_0.9.7.5ubuntu2_i386.deb". That's assuming you still have dpkg.

            Comment


              #7
              [QUOTE=pauly;309722]Here is a link for kpackagekit deb download. Maybe that will help. Not sure.

              Got the package. Did not try to work with it yet. Thanks for the link.

              Comment


                #8
                well, I have some files left in /etc/apt and some in var/lib/apt. BNoth directories and files.
                However, I encounter the blue screen before I can do anything. A command prompt and attempted apt-get <packages> failed because package apt id not installed.

                Thank you very much for the advice. I will follow it and report on the outcome.

                Comment


                  #9
                  Originally posted by dibl View Post
                  If you can follow SteveRiley's suggestion, and it happens to work, that would be the best first thing to try, since reinstalling sounds problematic. Go to the link he posted, download the .deb file for your architecture -- 32-bit, I guess, and use "sudo dpkg -i apt_0.9.7.5ubuntu2_i386.deb". That's assuming you still have dpkg.

                  I believe I do.
                  Well check later. downloading the recommended packages.

                  Comment


                    #10
                    I went from my working 12.04 installation to the damaged 12.10. See how in the output below.
                    Attempted to install the recommended package.
                    Unmet dependencies.

                    "pj@pj-A45:/media/KUB3./home/peter/Downloads$ sudo apt-get install libapt-pkg4.12
                    Reading package lists... Done
                    Building dependency tree
                    Reading state information... Done
                    libapt-pkg4.12 is already the newest version.
                    libapt-pkg4.12 set to manually installed.
                    You might want to run 'apt-get -f install' to correct these:
                    The following packages have unmet dependencies:
                    apt : Depends: libapt-pkg4.12 (>= 0.9.7.5ubuntu2) but 0.8.16~exp12ubuntu10.2 is to be installed
                    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
                    pj@pj-A45:/media/KUB3./home/peter/Downloads$ apt-get -f install
                    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
                    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
                    pj@pj-A45:/media/KUB3./home/peter/Downloads$ sudo apt-get -f install
                    Reading package lists... Done
                    Building dependency tree
                    Reading state information... Done
                    Correcting dependencies... Done
                    The following packages were automatically installed and are no longer required:
                    app-install-data-partner patch update-notifier-common
                    Use 'apt-get autoremove' to remove them.
                    The following packages will be REMOVED:
                    apt aptdaemon apturl-kde kubuntu-desktop libmuonprivate1 muon muon-installer muon-notifier muon-updater python-aptdaemon
                    python-aptdaemon.gtk3widgets python-software-properties software-properties-gtk software-properties-kde ubuntu-extras-keyring
                    ubuntu-minimal unattended-upgrades xul-ext-ubufox
                    WARNING: The following essential packages will be removed.
                    This should NOT be done unless you know exactly what you are doing!
                    apt
                    0 upgraded, 0 newly installed, 18 to remove and 0 not upgraded.
                    3 not fully installed or removed.
                    After this operation, 7,085 kB disk space will be freed.
                    You are about to do something potentially harmful.
                    To continue type in the phrase 'Yes, do as I say!'"

                    NO.
                    that part must have killed me before.

                    Comment


                      #11
                      The problem is almost solved. But I still cannot log into 12.10 proper.
                      I managed to install the recommnended packages despite some minor dependency problems.
                      Thereafter I used a command line to update and upgrade the installation via apt-get and Synaptic.
                      I also did an 'apt-get install fix-missing'. Nothing missing.

                      My data are all available (and copied to a safe place) and the installed applications accessible as long as I know how to start them from a command line. that's how I started this Firefox.

                      Yet, starting 12.10 from the normal way, I get the login screen and then - a blue screen of death. Nothing happening at all.
                      It appears to me that either a process is not starting or grub does not exactly know what version of Kubuntu I am calling up.
                      It presents me with a list of the isntalled versions, 12.04 and a whole lot of 3.2.XXXs that also only leasd to the blue screen.
                      Strangely enough, kernel 3.5.0-15-generic is not on the list.
                      Instead there is something about 'gnu installation/image and more ramblings.
                      Updated grub and it listed 12.10.

                      Not attempted to start it yet.

                      this texxt is coming from within 12.10 and a 12.10 Firefox.

                      Comment


                        #12
                        Still doing the same thing.
                        I can log in, followed by a blue screen.
                        Nothing else happens.

                        Using 12.04 to cd to 12.10 on command line lets me access installed applications as well as install new stuff.
                        But I cannot get to the standard GUI desktop.

                        Reinstalled a bunch of desktop related packages. No change.
                        Updated/upgraded system. No change. System is up to date.

                        Something is not running. But what?

                        Comment


                          #13
                          Can you log in to 12.10 with a text console?
                          When the login screen appears, hit CTRL-ALT-F1. That should take you to a text-based login prompt.
                          If you can log in that way, then try:

                          sudo service kdm stop
                          sudo service kdm start

                          that should take you to the graphical login screen.
                          If you then get a blue screen, hit CTRL-ALT-F1 again, and see if that gets you back to the text console.
                          Typically when Linux itself crashes, you don't get a blue screen, you get a black screen that may or may not have text on it, depending on what has actually crashed. If you are getting a blue screen, I suspect it's kde that is crashing. You can check /var/log/Xorg.0.log and also dmesg for any errors that may be showing up.
                          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                          Comment


                            #14
                            how about going into recovery konsol and sudo apt-get install kubuntu-desktop

                            That may pull in anything your missing, but I am assuming you fixed the apt problem.

                            Comment


                              #15
                              Thanks for the suggestions.
                              Worked as predicted.
                              Still getting blue screen, and CTRL-ALT-F1 at blue screen gets me back to the text-based login prompt.
                              I do not know what command would get me a Kickoff Application Launcher button - if possible at all, because when I start an application from the command line, I get the graphical version of the app.

                              The log file shows several errors related to the monitor, but the settings are correct and the device is working properly.
                              Dmesg has errors as well, but they are not related to the problem. At least as far as I know.
                              It would take too much space to post everything here.

                              One possible hint: On loging out from the text prompt/command line three error messages are displayed. All complain about
                              /etc/apt/preferences.d
                              missing. The directory exists but is empty.
                              On the other hand, so is the directory in my working 12.04 installation.

                              I would reinstall were it not for the fact that I have upgraded from 12.04 to 12.10. No CD available. Never tried burning a DVD on my DVD/CD burner.

                              Comment

                              Working...
                              X