how to edit source.list

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
getstarted
Level 1
Level 1
Posts: 16
Joined: Sun Jul 03, 2016 2:11 pm

how to edit source.list

Post by getstarted »

Summary: How to edit source.list/software repo to force https connection?

Details: I posted a question a couple of days ago about not being able to install texlive fonts in a newly installed (from scratch) 64bit LM 19.1 xfce, specifically I could not fetch the deb file:

viewtopic.php?f=47&t=284434

I ran into this exact same problem on a different machine, with a newly installed 32bit lubuntu 18.04.1. I posted my question on launchpad (it's a long thread but see summary below):

https://answers.launchpad.net/ubuntu/+s ... ion/677188

The solution for lubuntu was to edit /etc/apt/source.list and replace every "deb http" with "deb https". On LM 19.1 xfce, I was able to manually download a couple of the missing texlive fonts deb files using https. But I could not find an "editable" /etc/apt/source.list file. I really need latex for work; your help and suggestions are most welcome.

Note: the LM 19.1 machine was previously running LM 18.1 xfce and I had no problem install texlive-latex so I am baffled as to why it fails now. Also, the LM 19.1 is newly installed from scratched, and turning off the LM firewall makes no difference.

gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: how to edit source.list

Post by gm10 »

In my experience (and judging by forum threads around here) evowise is a terrible mirror causing lots of problems, you can likely fix your issue by switching to a different mirror instead.

If that does not work or you want to edit the repository entries regardless, then do:

Code: Select all

sudo -e /etc/apt/sources.list.d/official-package-repositories.list
and, if you've enabled source code repositories, also:

Code: Select all

sudo -e /etc/apt/sources.list.d/official-source-repositories.list
Last edited by gm10 on Sat Dec 29, 2018 11:53 am, edited 3 times in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 24616
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: how to edit source.list

Post by xenopeek »

Do you still have the original problem? If I click on the link http://archive.ubuntu.com/ubuntu/pool/m ... -3_all.deb from your other post the file downloads for me.

Second, let's be very clear that whether HTTP or HTTPS is used for your repositories will not make a difference for the download error in your other post. If you can't connect to the server with HTTP, you won't be able to connect with HTTPS either (it's the same server after all).

There's no such file "/etc/apt/source.list"—if you created the file it should be renamed to /etc/apt/sources.list as that is its name. Linux Mint itself stores its repository configuration in the files in the /etc/apt/sources.list.d/ directory. To quickly get an overview of all your repository configuration files and what is in each run the command:
inxi -r

If you did create the file /etc/apt/sources.list you could edit it with command:
xed admin:///etc/apt/sources.list
The default Linux Mint repositories are configured in /etc/apt/sources.list.d/official-package-repositories.list and you'd edit that the same way with:
xed admin:///etc/apt/sources.list.d/official-package-repositories.list

Before you switch any configured repository from HTTP to HTTPS make sure that is actually supported by each server! You can check by copying the HTTP address to your web browser, seeing if a page opens (usually it shows a directory listing), and then changing the HTTP to HTTPS and seeing if you can still open the same page with that.
Image

User avatar
xenopeek
Level 24
Level 24
Posts: 24616
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: how to edit source.list

Post by xenopeek »

gm10 wrote:
Sat Dec 29, 2018 11:50 am
In my experience (and judging by forum threads around here) evowise is a terrible mirror causing lots of problems, you can like fix your issue by switching to a different mirror instead.
The problem in the other topic is about failed connection to archive.ubuntu.com
Image

gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: how to edit source.list

Post by gm10 »

xenopeek wrote:
Sat Dec 29, 2018 11:53 am
gm10 wrote:
Sat Dec 29, 2018 11:50 am
In my experience (and judging by forum threads around here) evowise is a terrible mirror causing lots of problems, you can like fix your issue by switching to a different mirror instead.
The problem in the other topic is about failed connection to archive.ubuntu.com
Fair enough, I had only looked at the https "solution" in the askubuntu thread. In that case it's a network problem on OP's end (including their ISP) I guess.

Also, as you pointed out, not all repositories support HTTPS. archive.ubuntu.com very notably does not.

Post Reply

Return to “Installation & Boot”