Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
To start with I would like to say that I really suck at Linux, but I try, and in trying I usually fail.
I started to download WineHQ using their instructions and somewhere in there I must have screwed up, because now, every time I try to download and install a new software I get the same type message.
"E: Malformed entry 2 in list file /etc/apt/sources.list.d/additional-repositories.list (Component)
E: Sourcelist could not be read."
It's OK if you suck at linux; all of us did at one stage, and many of us still do :-).
Quote:
Originally Posted by Quilthor
E: Malformed entry 2 in list file /etc/apt/sources.list.d/additional-repositories.list (Component)
E: Sourcelist could not be read.
Have you made friends with a text editor yet? If not use vi, which will point to some editor. The basic instructions are:
Insert key (once) = enter write mode; Insert again = replace mode
Escape key = exit any mode
: (colon) = command mode.
You need Esc :wq = write and quit or Esc :q! = Don't write and quit
Try
Code:
sudo vi /etc/apt/sources.list.d/additional-repositories.list
Examine line 2 because it's wrong, fix it and try 'sudo apt-get update' Then try installing wine. If that doesn't work, post /etc/apt/sources.list.d/additional-repositories.list
Thank you for your help, although for me it's all ancient greek.
I managed to open the repositories list, but there i really didn't know what to do. I deleted the incorrect line. So far so good, but I could not exit the text edit with any other means than to close the window. I retried the command and got a new error, that I already had one open(of course), I followed the instructions to open the old list and came back to the same problem...I cannot exit the text edit.
I am fairly sure I am doing something terribly wrong.
If I can only exit the text edit and do the update command I think I'll be alright...for now
It would help if you say which editor you are using. Even with text editors, there's more than one way to skin a cat!
With vi or vim, you save the altered file with ":w" and then quit with ":q". Or you can do both at once with ":wq". With nano, you use the list of control key combinations displayed at the bottom of the screen. I think it's ctrl+w to save and ctrl+q to quit, but I could be wrong.
You mention a window, so perhaps you're using a graphical editor like leafpad or gedit. Those are fine too; you don't need to use a text editor if you have a working graphical desktop. In those cases of course, you can use File->Save followed by File->Exit.
What is essential in all these cases though is that you do the edit as the root user, because ordinary users aren't allowed to edit system files. You can go through the motions using any editor you like, but you won't be allowed to save the result.
You haven't said what distro you are using but it's obviously something in the Debian family because you have apt. If it is Debian, you can use su to get to root, but if it's Ubuntu or Mint, you will need to use sudo.
Thanx again.
I'm about to turn into an ol' geezer m'self, but the difference is I can be dazzled.
Anywho...Now I understand a little more, thanx to you.
I was using the vi editor, since it was what suggested. I wouldn't have the foggiest idea how to use any other, at this point.
The window I mentioned was just the terminal window.Again, no idea what I would call it otherwise (I suck, remember?)
Finally, and again thank you...Before your last message I had no idea what a distro was. Now I do, and its Mint I have.
Now I am going to attempt this again. You will be the first to know if I succeed or if I once again fail miserably.
You asked what text editor i was using. I said vi. I wasn't. I was in the terminal window.
So now I am trying to download vim, and of course there is an error in the download.
Time for more drastical measures...
Don't get too drastic too soon! In fact, if you are in that kind of mood, you might want to go off and have a cup of tea before proceeding further.
You probably were using vi, because you do use that in a terminal window. And if I were you, I would continue with vi for the time being. Don't try to install anything else until you get your apt files sorted.
Use "sudo vi" to do your edit and correct what was wrong. Don't try anything new until you have done that!
Vi is a geek tool: I have to go and consult a book if I need it, as I can never remember how it works! If ever you are stuck without a GUI, you can use nano, which comes with Ubuntu.
Incidentally, if you run Synaptic, you can manage your repositories by clicking on Settings - Repositories.
1) Don't panic! When you panic, you are likely to do foolish things. And in Linux, it really isn't necessary. Most problems can be fixed.
2) Work systematically. If you find an error in an important configuration file, you need to fix it before going any further. In particular, you can't run whatever program uses that file until you have fixed it.
3) Choose one editor and get to know it. It doesn't matter whether it's a text editor or a graphical one. You just need to have an editor in your toolkit. Remember that in Linux, all configuration files are plain text and can be edited, but you need to be root to do that. Which means using su or sudo.
4) When asking for help, give as much information as possible. Don't worry about not knowing the vocabulary; that comes with practice.
5) Don't be self-conscious. We were all newbies once.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.