LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Accidental File Overwrite (https://www.linuxquestions.org/questions/linux-newbie-8/accidental-file-overwrite-4175498247/)

icorey2014 03-14-2014 09:03 PM

Accidental File Overwrite
 
Earlier today, I was attempting to install flash to my debian linux through the terminal, and I was prompted by the site to edit a file called sources.list. I accidentally deleted a line, and overwrote it with a subtle variation of the line that the site gave me. Hoever, this did not work, and now, when I go to install a package file or something in that general area, I get a notification saying that line #2 is not valid, and the entire file cannot be read for the sources. I don't know what the original line was, is there any way I can recover the file to how it existed before I made the changes? If not, how can I fix this problem, or will I have to end up reinstalling linux to my computer? I only have the netbook, and an unrooted android phone (That won't tether to the computer), plus an 8GB flash drive.

redd9 03-14-2014 09:13 PM

Perhaps this link would be of use to you: https://wiki.debian.org/SourcesList? You could copy their example.
If you also want the contrib and non-free components, add contrib non-free after main. I am assuming the file is /etc/apt/sources.list.

icorey2014 03-14-2014 09:19 PM

Didn't work. I still get the following message:

E: Type '' is not known on line 2 in source list /etc/apt/sources.list
E: The list of sources could not be read.

I didn't delete any of the other lines that were alread on there. You're right, the file is /etc/apt/sources.list.

icorey2014 03-14-2014 09:23 PM

I also tried making a backup file of the original, and renaming it sources1.list, and deleting all the old lines, and then saving that as the primary sources.list file. Still getting the same message.

TobiSGD 03-15-2014 05:44 AM

It would help if you show us how your file actually looks like, so that we can spot and correct the error.

icorey2014 03-15-2014 10:48 AM

Well, I did some extra repositioning of the lines, and it seems to be working fine now. I think I just didn't put the lines in the correct place. How do I mark the thread as resolved?

TobiSGD 03-18-2014 06:51 PM

Use the thread tools right above the first post.


All times are GMT -5. The time now is 06:27 PM.