My problems in Aptitude: I keep getting this error

E: The method driver /usr/lib/apt/methods/http could not be found. W: Is the package apt-transport-http installed? And I can't update anything, if I'm installing I get this:

E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.

or sometimes this with the log above:

E: Internal error: couldn't generate list of packages to download

And when I installed Aptitude just earlier, it uninstalled apt.

My problems with apt:

Sometimes, I can't use sudo apt-get update and sudo apt-get upgrade.

I forgot the rest because I can't do it again because Aptitude uninstalled it. PLEASE HELP ME!

  • Nope, Aptitude uninstalled apt, I can't do stuff with Aptitude, and I do not know how to install apt. Question is really different from that. – icebunny08 May 25 '18 at 9:40
  • Maybe this one helps: askubuntu.com/questions/830070/… – Aryo Adhi May 25 '18 at 9:43
  • Do you remember what you did before your system became too broken? Please add some details to the question. You have had broken /etc/environment, we fixed it. What else? – N0rbert May 25 '18 at 9:49
  • Netbeans can't install because it cannot find Java, but BlueJ works almost flawlessly. BlueJ says: Gtk-Message: 18:58:58.044: Failed to load module "overlay-scrollbar", so do other apps, I also can't install some repositories and packages, here are the logs: E: The repository 'ppa.launchpad.net/rgibert/ebook/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. P.S. It's not just that repo that has that... – icebunny08 May 25 '18 at 11:01
  • 2
    AskUbuntu guidelines ask for ONE question per post, so please create a new post for other issues. – K7AAY May 25 '18 at 17:23

Reinstall apt package with one of the methods below:

  • method 1 (if aptitude is alive)

    sudo aptitude install apt
  • method 2 (if apt-get is alive)

    cd ~/Downloads
    apt-get download apt
    sudo dpkg -i apt*.deb
  • method 3 (using wget and dpkg)

    cd ~/Downloads
    wget http://mirrors.kernel.org/ubuntu/pool/main/a/apt/apt_1.6.1_amd64.deb
    sudo dpkg -i --force-all apt*.deb

Then use apt-get as before:

sudo apt-get update
sudo apt-get dist-upgrade
  • I get this: dpkg: error processing archive apt_1.6.1_amd64.deb (--install): installing apt would break aptitude, and deconfiguration is not permitted (--auto-deconfigure might help) Errors were encountered while processing: apt_1.6.1_amd64.deb – icebunny08 May 25 '18 at 9:52
  • But sudo aptitude install apt works? – N0rbert May 25 '18 at 9:54
  • The thing I posted above says that it's dangerous because installing apt might break aptitude, so I think I just need to uninstall aptitude. I got this with the shell command you just sent to me/the one I'm replying to, 0 packages upgraded, 1 newly installed, 0 to remove and 6 not upgraded. Need to get 1,043 kB of archives. After unpacking 3,429 kB will be used. E: The method driver /usr/lib/apt/methods/http could not be found. E: The method driver /usr/lib/apt/methods/http could not be found. E: Internal error: couldn't generate list of packages to download – icebunny08 May 25 '18 at 10:00
  • Try with sudo dpkg -i --force-all apt*.deb. – N0rbert May 25 '18 at 10:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.