[SOLVED] Sources.list removed and i have problem

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Fathi

[SOLVED] Sources.list removed and i have problem

Post by Fathi »

by mistake i have delete my sources.list file from /etc/apt/
now i can't update anything or install any thing all i have an error message i am using linux mint 18 (Sarah)
i need help with that error:

E: Malformed entry 2 in list file /etc/apt/sources.list.d/additional-repositories.list (URI parse)
E: The list of sources could not be read.
Last edited by Fathi on Thu Oct 19, 2017 11:25 pm, edited 2 times in total.
minitux

Re: Sources.list removed and i have problem

Post by minitux »

post terminal output of

Code: Select all

inxi -Sr
User avatar
JerryF
Level 16
Level 16
Posts: 6571
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Sources.list removed and i have problem

Post by JerryF »

If you used your file manager to accidentally delete the file, check your trash. It may be in there and if it is, you can restore it.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Sources.list removed and i have problem

Post by Flemur »

Fathi wrote:by mistake i have delete my sources.list file from /etc/apt/
now i can't update anything or install any thing all i have an error message i am using linux mint 18 (Sarah)
i need help with that error:

E: Malformed entry 2 in list file /etc/apt/sources.list.d/additional-repositories.list (URI parse)
E: The list of sources could not be read.
So you have two problems. What does your /etc/apt/sources.list.d/additional-repositories.list file look like?

FWIW, Here are my files for Mint 18.2 - not much to them (my only added repo is for wine).

Code: Select all

$ cat /etc/apt/sources.list
#deb cdrom:[Linux Mint 18 _Sarah_ - Release amd64 20160607]/ xenial contrib main non-free

Code: Select all

$ cat /etc/apt/sources.list.d/additional-repositories.list 
deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
minitux

Re: Sources.list removed and i have problem

Post by minitux »

I did not see this
Fathi wrote:i have delete my sources.list file from /etc/apt/
@Fathi in addition to

Code: Select all

inxi -Sr
post also

Code: Select all

ls -1 /etc/apt
However, in /etc/apt/sources.list on Mint as there is nothing useful (Mint is not Ubuntu)

Mint Repositories are in /etc/apt/sources.list.d/official-package-repositories.list, for this reason, even if you've deleted /etc/apt/sources.list you did not make any damage and the only damage, it may be just what you listed in /etc/apt/sources.list.d/additional-repositories.list
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Sources.list removed and i have problem

Post by karlchen »

Hi, Fathi.

On Linux Mint 18 Sarah, you can launch Software Sources from the Mint Menu. At the bottom of the Software Sources application window, there is a button to restore the default repository configuration.

Image
(Click the screenshot to enlarge. Press <alt><cursor_left> to return here.)

The category buttons [PPAs] and [Additional Repositories] offer the chance of correcting the configured PPAs and Additional Repositories.

But first of all it may be wise to do as minitux wrote. Provide the screen output of

Code: Select all

inxi -Sr
please.

HTH,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Fathi

Re: Sources.list removed and i have problem

Post by Fathi »

Thanks to everyone But it still the same problem i can't do anything it still the same problem
when i type in Terminal i "sudo apt-get update " and this what disappear to me Image
and when i click in Restore the default settings i get 2 image Image



-- i get the resource.list file from live CD and copy it to directory /etc/apt/ but same problem
minitux

Re: Sources.list removed and i have problem

Post by minitux »

you have not done anything that was suggested to you, you have to post the outputs of the commands from the terminal ....

anyway, meanwhile, do this

Code: Select all

gksudo xed /etc/apt/sources.list.d/additional-package-repositories.list
and delete all in this file, and then save the file and close it.
then

Code: Select all

sudo apt-get update
and post the output

and post also the terminal output of

Code: Select all

inxi -Sr
and

Code: Select all

ls -1 /etc/apt
as we have already said before
Fathi

Re: Sources.list removed and i have problem

Post by Fathi »

Thanks it works thanks for everyone :D :D
User avatar
JerryF
Level 16
Level 16
Posts: 6571
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Sources.list removed and i have problem

Post by JerryF »

Great!

Please edit your first post and insert [SOLVED] at the beginning of the Subject line.
minitux

Re: Sources.list removed and i have problem

Post by minitux »

Fathi wrote:Thanks it works thanks for everyone :D :D
Good :)
intro

Re: [SOLVED] Sources.list removed and i have problem

Post by intro »

I accidentally deleted my /etc/apt/sources.list
The output of inxi -Sr

Code: Select all

System: My name :lol:   Kernel: 4.15.0-39-genericx86_64. Bits: 64. Console:ttyl (as my cinnamon gui crashed)  Distro: Linux Mint 19 Tara

Repos: No repo data detected. 
I have cleared all the additional repos and ppas.

Now just need the sources.list so that i can add it with nano...please help
User avatar
Moem
Level 22
Level 22
Posts: 16233
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: [SOLVED] Sources.list removed and i have problem

Post by Moem »

Intro's thread is here. Since we don't want or or need a second thread about the same problem, and this one is old and also solved, time to lock this one.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Locked

Return to “Software & Applications”