sources.list file malformed Ubuntu 18.04 [duplicate]












0















This question already has an answer here:




  • How do I restore the default repositories?

    3 answers




Now I get this error:



WARNING:root:could not open file '/etc/apt/sources.list'


I would somehow like to get my original file back, plus some good instructions about how to install R that won't corrupt it.





ok - copied old version. Looks like the version after some program copied in the sources for the R package. Now get error:



sudo apt-get update
E: Malformed entry 50 in list file /etc/apt/sources.list (absolute Suite Component)
E: The list of sources could not be read.


Here is the file - what I think are lines 49 - 51. (Got an error about too many links when I tried to include the whole file)



# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ apt update sudo
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ sudo apt update


(The first and third line start with #)





Ok - now tried gedit with line numbers on as you suggested. Just deleted line 50. Now get update is running. Don't know if R will actually install but this solves the issue I posted here. How do I accept your answer? And thank you very much for all your help.










share|improve this question















marked as duplicate by Kulfy, Zanna, Charles Green, Eric Carvalho, RoVo Dec 21 '18 at 8:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • In terminal, do sudo ls -al /etc/apt/sources.list.*, and check the dates and sizes. If they're current enough, we can just copy one over to be sources.list. Show the list as an edit to your question. Also, gedit will show line numbers if you enable that in the prefs (and the plugin is enabed). Report back to @heynnema
    – heynnema
    Oct 26 '18 at 2:45












  • I know this is an old answer, but it should still work. askubuntu.com/questions/124017/…
    – Terrance
    Oct 26 '18 at 2:54










  • @heynnema Thanks got this:
    – Gary 1008
    Oct 26 '18 at 17:48










  • -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save /etc/apt/sources.list.d: total 8 drwxr-xr-x 2 root root 4096 Apr 20 2018 . drwxr-xr-x 6 root root 4096 Oct 23 22:30 ..
    – Gary 1008
    Oct 26 '18 at 17:50
















0















This question already has an answer here:




  • How do I restore the default repositories?

    3 answers




Now I get this error:



WARNING:root:could not open file '/etc/apt/sources.list'


I would somehow like to get my original file back, plus some good instructions about how to install R that won't corrupt it.





ok - copied old version. Looks like the version after some program copied in the sources for the R package. Now get error:



sudo apt-get update
E: Malformed entry 50 in list file /etc/apt/sources.list (absolute Suite Component)
E: The list of sources could not be read.


Here is the file - what I think are lines 49 - 51. (Got an error about too many links when I tried to include the whole file)



# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ apt update sudo
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ sudo apt update


(The first and third line start with #)





Ok - now tried gedit with line numbers on as you suggested. Just deleted line 50. Now get update is running. Don't know if R will actually install but this solves the issue I posted here. How do I accept your answer? And thank you very much for all your help.










share|improve this question















marked as duplicate by Kulfy, Zanna, Charles Green, Eric Carvalho, RoVo Dec 21 '18 at 8:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • In terminal, do sudo ls -al /etc/apt/sources.list.*, and check the dates and sizes. If they're current enough, we can just copy one over to be sources.list. Show the list as an edit to your question. Also, gedit will show line numbers if you enable that in the prefs (and the plugin is enabed). Report back to @heynnema
    – heynnema
    Oct 26 '18 at 2:45












  • I know this is an old answer, but it should still work. askubuntu.com/questions/124017/…
    – Terrance
    Oct 26 '18 at 2:54










  • @heynnema Thanks got this:
    – Gary 1008
    Oct 26 '18 at 17:48










  • -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save /etc/apt/sources.list.d: total 8 drwxr-xr-x 2 root root 4096 Apr 20 2018 . drwxr-xr-x 6 root root 4096 Oct 23 22:30 ..
    – Gary 1008
    Oct 26 '18 at 17:50














0












0








0


1






This question already has an answer here:




  • How do I restore the default repositories?

    3 answers




Now I get this error:



WARNING:root:could not open file '/etc/apt/sources.list'


I would somehow like to get my original file back, plus some good instructions about how to install R that won't corrupt it.





ok - copied old version. Looks like the version after some program copied in the sources for the R package. Now get error:



sudo apt-get update
E: Malformed entry 50 in list file /etc/apt/sources.list (absolute Suite Component)
E: The list of sources could not be read.


Here is the file - what I think are lines 49 - 51. (Got an error about too many links when I tried to include the whole file)



# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ apt update sudo
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ sudo apt update


(The first and third line start with #)





Ok - now tried gedit with line numbers on as you suggested. Just deleted line 50. Now get update is running. Don't know if R will actually install but this solves the issue I posted here. How do I accept your answer? And thank you very much for all your help.










share|improve this question
















This question already has an answer here:




  • How do I restore the default repositories?

    3 answers




Now I get this error:



WARNING:root:could not open file '/etc/apt/sources.list'


I would somehow like to get my original file back, plus some good instructions about how to install R that won't corrupt it.





ok - copied old version. Looks like the version after some program copied in the sources for the R package. Now get error:



sudo apt-get update
E: Malformed entry 50 in list file /etc/apt/sources.list (absolute Suite Component)
E: The list of sources could not be read.


Here is the file - what I think are lines 49 - 51. (Got an error about too many links when I tried to include the whole file)



# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ apt update sudo
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ sudo apt update


(The first and third line start with #)





Ok - now tried gedit with line numbers on as you suggested. Just deleted line 50. Now get update is running. Don't know if R will actually install but this solves the issue I posted here. How do I accept your answer? And thank you very much for all your help.





This question already has an answer here:




  • How do I restore the default repositories?

    3 answers








apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '18 at 11:00









Zanna

50.2k13132241




50.2k13132241










asked Oct 26 '18 at 2:35









Gary 1008

42




42




marked as duplicate by Kulfy, Zanna, Charles Green, Eric Carvalho, RoVo Dec 21 '18 at 8:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Kulfy, Zanna, Charles Green, Eric Carvalho, RoVo Dec 21 '18 at 8:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • In terminal, do sudo ls -al /etc/apt/sources.list.*, and check the dates and sizes. If they're current enough, we can just copy one over to be sources.list. Show the list as an edit to your question. Also, gedit will show line numbers if you enable that in the prefs (and the plugin is enabed). Report back to @heynnema
    – heynnema
    Oct 26 '18 at 2:45












  • I know this is an old answer, but it should still work. askubuntu.com/questions/124017/…
    – Terrance
    Oct 26 '18 at 2:54










  • @heynnema Thanks got this:
    – Gary 1008
    Oct 26 '18 at 17:48










  • -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save /etc/apt/sources.list.d: total 8 drwxr-xr-x 2 root root 4096 Apr 20 2018 . drwxr-xr-x 6 root root 4096 Oct 23 22:30 ..
    – Gary 1008
    Oct 26 '18 at 17:50


















  • In terminal, do sudo ls -al /etc/apt/sources.list.*, and check the dates and sizes. If they're current enough, we can just copy one over to be sources.list. Show the list as an edit to your question. Also, gedit will show line numbers if you enable that in the prefs (and the plugin is enabed). Report back to @heynnema
    – heynnema
    Oct 26 '18 at 2:45












  • I know this is an old answer, but it should still work. askubuntu.com/questions/124017/…
    – Terrance
    Oct 26 '18 at 2:54










  • @heynnema Thanks got this:
    – Gary 1008
    Oct 26 '18 at 17:48










  • -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save /etc/apt/sources.list.d: total 8 drwxr-xr-x 2 root root 4096 Apr 20 2018 . drwxr-xr-x 6 root root 4096 Oct 23 22:30 ..
    – Gary 1008
    Oct 26 '18 at 17:50
















In terminal, do sudo ls -al /etc/apt/sources.list.*, and check the dates and sizes. If they're current enough, we can just copy one over to be sources.list. Show the list as an edit to your question. Also, gedit will show line numbers if you enable that in the prefs (and the plugin is enabed). Report back to @heynnema
– heynnema
Oct 26 '18 at 2:45






In terminal, do sudo ls -al /etc/apt/sources.list.*, and check the dates and sizes. If they're current enough, we can just copy one over to be sources.list. Show the list as an edit to your question. Also, gedit will show line numbers if you enable that in the prefs (and the plugin is enabed). Report back to @heynnema
– heynnema
Oct 26 '18 at 2:45














I know this is an old answer, but it should still work. askubuntu.com/questions/124017/…
– Terrance
Oct 26 '18 at 2:54




I know this is an old answer, but it should still work. askubuntu.com/questions/124017/…
– Terrance
Oct 26 '18 at 2:54












@heynnema Thanks got this:
– Gary 1008
Oct 26 '18 at 17:48




@heynnema Thanks got this:
– Gary 1008
Oct 26 '18 at 17:48












-rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save /etc/apt/sources.list.d: total 8 drwxr-xr-x 2 root root 4096 Apr 20 2018 . drwxr-xr-x 6 root root 4096 Oct 23 22:30 ..
– Gary 1008
Oct 26 '18 at 17:50




-rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save /etc/apt/sources.list.d: total 8 drwxr-xr-x 2 root root 4096 Apr 20 2018 . drwxr-xr-x 6 root root 4096 Oct 23 22:30 ..
– Gary 1008
Oct 26 '18 at 17:50










1 Answer
1






active

oldest

votes


















1














From the comments...



In terminal do...



sudo ls -al /etc/apt/sources.list.*



answer:



-rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old 
-rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save


funny enough, they're both the same date, but sources.list.old is much larger than sources.list.save, so I suspect that's the one we need. Let's briefly look at each one...



cd /etc/apt # change directory



cat sources.list.old # view the .old file



cat sources.list.save # view the .save file



Does the .old file look more complete? If so, do this...



sudo rm -i sources.list # remove the old empty sources.list



sudo cp sources.list.old sources.list # copy over a replacement



sudo apt-get update # update the software database




  • you shouldn't get any errors on this last step. If you do, put a list of the errors as an edit to your question... not in the comments, please.






share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    From the comments...



    In terminal do...



    sudo ls -al /etc/apt/sources.list.*



    answer:



    -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old 
    -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save


    funny enough, they're both the same date, but sources.list.old is much larger than sources.list.save, so I suspect that's the one we need. Let's briefly look at each one...



    cd /etc/apt # change directory



    cat sources.list.old # view the .old file



    cat sources.list.save # view the .save file



    Does the .old file look more complete? If so, do this...



    sudo rm -i sources.list # remove the old empty sources.list



    sudo cp sources.list.old sources.list # copy over a replacement



    sudo apt-get update # update the software database




    • you shouldn't get any errors on this last step. If you do, put a list of the errors as an edit to your question... not in the comments, please.






    share|improve this answer


























      1














      From the comments...



      In terminal do...



      sudo ls -al /etc/apt/sources.list.*



      answer:



      -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old 
      -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save


      funny enough, they're both the same date, but sources.list.old is much larger than sources.list.save, so I suspect that's the one we need. Let's briefly look at each one...



      cd /etc/apt # change directory



      cat sources.list.old # view the .old file



      cat sources.list.save # view the .save file



      Does the .old file look more complete? If so, do this...



      sudo rm -i sources.list # remove the old empty sources.list



      sudo cp sources.list.old sources.list # copy over a replacement



      sudo apt-get update # update the software database




      • you shouldn't get any errors on this last step. If you do, put a list of the errors as an edit to your question... not in the comments, please.






      share|improve this answer
























        1












        1








        1






        From the comments...



        In terminal do...



        sudo ls -al /etc/apt/sources.list.*



        answer:



        -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old 
        -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save


        funny enough, they're both the same date, but sources.list.old is much larger than sources.list.save, so I suspect that's the one we need. Let's briefly look at each one...



        cd /etc/apt # change directory



        cat sources.list.old # view the .old file



        cat sources.list.save # view the .save file



        Does the .old file look more complete? If so, do this...



        sudo rm -i sources.list # remove the old empty sources.list



        sudo cp sources.list.old sources.list # copy over a replacement



        sudo apt-get update # update the software database




        • you shouldn't get any errors on this last step. If you do, put a list of the errors as an edit to your question... not in the comments, please.






        share|improve this answer












        From the comments...



        In terminal do...



        sudo ls -al /etc/apt/sources.list.*



        answer:



        -rw-rw-r-- 1 root root 3396 Oct 23 12:21 /etc/apt/sources.list.old 
        -rw-r--r-- 1 root root 171 Oct 23 22:31 /etc/apt/sources.list.save


        funny enough, they're both the same date, but sources.list.old is much larger than sources.list.save, so I suspect that's the one we need. Let's briefly look at each one...



        cd /etc/apt # change directory



        cat sources.list.old # view the .old file



        cat sources.list.save # view the .save file



        Does the .old file look more complete? If so, do this...



        sudo rm -i sources.list # remove the old empty sources.list



        sudo cp sources.list.old sources.list # copy over a replacement



        sudo apt-get update # update the software database




        • you shouldn't get any errors on this last step. If you do, put a list of the errors as an edit to your question... not in the comments, please.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 26 '18 at 18:11









        heynnema

        18.1k22054




        18.1k22054















            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

             ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕