You are not logged in.

#1 2020-08-18 17:07:34

schwim
Member
From: Coastal VA, Murica
Registered: 2015-09-29
Posts: 342
Website

[SOLVED]Trying to install visual code, "could not find a distribution"

Hi there folks!

Trying to install code via this tutorial and am having a problem with an error when following the instructions, specifically this:

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

which results in this error:

schwim@schwim-vm-bll:~$ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 95, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Bunsenlabs/buster

I'm googling but not finding a working solution for my install of lithium I've tried solutions listed for Ubu and vanilla deb but it's not working for me. Could someone point me towards a fix?

Thanks for your time!

Last edited by schwim (2020-08-18 21:10:25)


Schw.im! A social site with an identity crisis.

Offline

#2 2020-08-18 20:39:24

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: [SOLVED]Trying to install visual code, "could not find a distribution"

schwim wrote:

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

which results in this error:

That command is only for adding the text:

deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main

in file /etc/apt/sources.list. It works for me on an Debian Buster box. Tested two Lithium boxes and get the same error. But you can instead as root launch your favorite editor and manualy edit sources.list.


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#3 2020-08-18 20:54:09

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED]Trying to install visual code, "could not find a distribution"

On my system I have the file /etc/apt/sources.list.d/vscode.list containing

deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main

Then update/install.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#4 2020-08-18 21:09:02

schwim
Member
From: Coastal VA, Murica
Registered: 2015-09-29
Posts: 342
Website

Re: [SOLVED]Trying to install visual code, "could not find a distribution"

rbh wrote:

That command is only for adding the text:

Ah I feel silly, should have noticed that.  Thank you very much, that got me the install smile


Schw.im! A social site with an identity crisis.

Offline

#5 2020-08-18 21:09:50

schwim
Member
From: Coastal VA, Murica
Registered: 2015-09-29
Posts: 342
Website

Re: [SOLVED]Trying to install visual code, "could not find a distribution"

damo wrote:

On my system I have the file /etc/apt/sources.list.d/vscode.list containing

deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main

Then update/install.

Would that be the better way to keep it, rather than adding to sources.list or is it just two ways of skinning a cat?


Schw.im! A social site with an identity crisis.

Offline

#6 2020-08-18 21:18:06

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED]Trying to install visual code, "could not find a distribution"

You can have everything in sources.list, but it keeps things tidier to have extra sources in sources.list.d files. And you can't then mess up editing sources.list wink

You could also read the Debian wiki for yourself: Configuring Apt Sources.

wiki wrote:

The main Apt sources configuration file is at /etc/apt/sources.list. You can edit this files (as root) using your favorite text editor.

To add custom sources, creating separate files under /etc/apt/sources.list.d/ is preferred.

See man 5 sources.list


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

Board footer

Powered by FluxBB