When I want to install any program on my Ubuntu, There comes an Error saying I have to add it to My repository, I find its PPA from launchpad.net and then type it in the terminal. it says the file is being imported, then after a while says: the file imported. Naturally, I have to update my repository now, but I can't. Yesterday when I tried to update it some errors were shown saying that some index files failed to download or 404 not found. I had some troubles with it and tried to fix it but couldn't. I worked on some codes in the terminal( I am new to this), and I think I made it worse, because now when I write sudo apt-get update in The Terminal, It shows a different message, here it is : E : the method driver /usr/lib/apt/methods/htt could not be found. Prior to this, I mean yesterday, I spent the whole day trying to fix it and read almost every single answer to any question asked about this issue but it didn't help. I tried to make changes to " Ubuntu software and update" but at the end when I wanted to save the changes made, through pressing " reload" a message would be shown saying " failed to download repository information, check your Internet connection, it was while I was sure that the I was connected to a WiFi network. I also tried to change the main server to a local server but at the end when saving there was the same problem. Briefly, I have just installed this windows and I don't know what to do, I can't even play music with this, niether I can download or install any apps, I really need your help. Thank you.
This is a copy of my terminal:
arash@arash-X450CC:~$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/htt could not be found.
arash@arash-X450CC:~$ sudo apt-get install chrome
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package chrome
arash@arash-X450CC:~$ ^C
arash@arash-X450CC:~$ ^C
arash@arash-X450CC:~$ sudo apt-get update
[sudo] password for arash:
E: The method driver /usr/lib/apt/methods/htt could not be found.
arash@arash-X450CC:~$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/htt could not be found.
arash@arash-X450CC:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
arash@arash-X450CC:~$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/htt could not be found.
arash@arash-X450CC:~$ apt-get upgrade
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?
I did the last part over. upgrade,update,upgrade. here is the result:
arash@arash-X450CC:~$ sudo apt-get upgrade
[sudo] password for arash:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
arash@arash-X450CC:~$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/htt could not be found.
arash@arash-X450CC:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
for example I want to install vlc player, here comes the output:
arash@arash-X450CC:~$ sudo apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vlc
I did the first part( writing the two commands in the terminal-before going to software and updates), here is the output:
arash@arash-X450CC:~$ cd /etc
arash@arash-X450CC:/etc$ sudo tar cjvf apt-back.tar.bz2
[sudo] password for arash:
tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
arash@arash-X450CC:/etc$
Then I went to software and updates, made sure those four parts you said are ticked in the checkboxes next to them, then went to the other tab, I mean other software, unticked all of them and pressed reload to save changes. But after a while there came an error. Here's the detailed error message:
W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/utopic/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.88.149 80]
, E:Some index files failed to download. They have been ignored, or old ones used instead.
here is the output after doing what you said
chmod +x myscript.sh
./myscript.sh
#!/bin/bash
mkdir ~/apt.back
cd ~/apt.back
sudo mv --backup=numbered /etc/apt/sources.list ../apt.back/
sudo mv --backup=numbered /etc/apt/sources.list.d/*list ../apt.back/
sudo apt-get update
step 1
this pic is for the first command. I did it with another name.

step 2 the next pic. for the next step after pressing ctrl+o to save. then I pressed enter.
