[SOLVED] apt-get => /usr/lib/apt/methods/https not found

Moderators: mdrjr, odroid

[SOLVED] apt-get => /usr/lib/apt/methods/https not found

Unread postby safeman » Fri Oct 10, 2014 11:44 pm

I'm getting this error which I suspect is because Ubuntu repositories are redirecting to https, because of this explanation, and because everything I have in my /usr/apt/sources.list is http.

All sources.list lines are of the form:
Code: Select all
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted


In fact "http://ports.ubuntu.com/ubuntu-ports/" is the ONLY url in there at all.

I've searched the forum but can't find this issue anywhere here, which seems strange, although the search isn't helpful as it rejects the terms I want to search for as too common, and when I do manage to frame an acceptable search, it says apt-get isn't anywhere on the forum, which it patently is!

I'd like to install the requisite apt method, but:
Code: Select all
sudo apt-get update
sudo apt-get install apt-transport-https


Fails with:
Code: Select all
After this operation, 216 kB of additional disk space will be used.
Err http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main apt-transport-https armhf 1.0.1ubuntu2.1
  404  Not Found [IP: 91.189.88.140 80]
Err http://ports.ubuntu.com/ubuntu-ports/ trusty-security/main apt-transport-https armhf 1.0.1ubuntu2.1
  404  Not Found [IP: 91.189.88.140 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/a/apt/apt-transport-https_1.0.1ubuntu2.1_armhf.deb  404  Not Found [IP: 91.189.88.140 80]


Maybe this is because the repositories don't hold armhf versions.

Can hardkernel or anyone here see a way through this. Maybe there's a clue in the fact that no-one else has hit this?

I'm on Odroid-U3 Ubuntu 14.04 LTS.

SOLUTION
I had an "https" repository entry in the file /apt/etc/sources.list.d/docker.list which I had not checked.

I removed this, which allowed apt-get commands to complete, and then executed:
Code: Select all
sudo apt-get install apt-transport-https

I recommend everyone do this, so when they pick up a repository that uses https, or which forces http to https, they don't hit this problem. Because if you aren't able to fix it by editing a sources file its going to be tricky!
Last edited by safeman on Wed Oct 15, 2014 1:21 am, edited 1 time in total.
safeman
 
Posts: 52
Joined: Fri Jun 27, 2014 11:04 pm
languages_spoken: english
ODROIDs: Odroid U3 + 64G eMMC

Re: apt-get update => /usr/lib/apt/methods/https could not b

Unread postby mdrjr » Sat Oct 11, 2014 12:13 am

apt-get update
what does it tells you?
mdrjr
Site Admin
 
Posts: 11623
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: apt-get update => /usr/lib/apt/methods/https could not b

Unread postby safeman » Sat Oct 11, 2014 12:17 am

mdrjr wrote:apt-get update
what does it tells you?


Code: Select all
sudo apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed


EDIT: The https method is not present but I can't install it as noted in the OP. The http method is present.
safeman
 
Posts: 52
Joined: Fri Jun 27, 2014 11:04 pm
languages_spoken: english
ODROIDs: Odroid U3 + 64G eMMC

Re: apt-get update => /usr/lib/apt/methods/https could not b

Unread postby mdrjr » Sat Oct 11, 2014 7:56 pm

Interesting.. I can't replicate that here :(
mdrjr
Site Admin
 
Posts: 11623
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [SOLVED] apt-get => /usr/lib/apt/methods/https not found

Unread postby masterdev » Thu Jul 27, 2017 10:39 am

Depending on your device/hardware you may need to substitute parts of the following.

Here's how to fix this error for ODROID XU4 with ODROBIAN:

Code: Select all
### FIX E: The method driver /usr/lib/apt/methods/https could not be found.
###     N: Is the package apt-transport-https installed?

apt-get update && apt-get upgrade
mv /etc/apt/sources.list.d/odrobian-5422.list /etc/apt/sources.list.d/odrobian-5422.list1
apt-get install apt-transport-https
mv /etc/apt/sources.list.d/odrobian-5422.list1 /etc/apt/sources.list.d/odrobian-5422.list
apt-get update && apt-get upgrade


After the commands above, your issue should be fixed.

Now update your sources list - open and replace contents with:
Code: Select all
### UPDATE SOURCES
nano /etc/apt/sources.list

deb http://http.debian.net/debian/ jessie main
deb-src http://http.debian.net/debian/ jessie main

deb http://http.debian.net/debian/ jessie-backports main
deb-src http://http.debian.net/debian/ jessie-backports main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://ftp.debian.org/debian/ jessie main non-free contrib
deb-src http://ftp.debian.org/debian/ jessie main non-free contrib

deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free


Now you're all set.
masterdev
 
Posts: 7
Joined: Thu Apr 07, 2016 9:32 pm
Location: Bulgaria
languages_spoken: english, german, bulgarian, korean, russian, macedonian
ODROIDs: C2


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 2 guests