/etc/apt/sources.list" E212: Can't open file for writing

后端 未结 13 800
一生所求
一生所求 2020-12-22 15:06

I am trying to edit sources.list using vi editor but getting the following error while saving the file:

/etc/apt/sources.list\" E212: Can\'t open file for wr         


        
13条回答
  •  佛祖请我去吃肉
    2020-12-22 15:47

    For me there was was quite a simple solution. I was trying to edit/create a file in a folder that didn't exist. As I was already in the folder I was trying to edit/create a file in.

    i.e. pwd folder/file

    and was typing

    sudo vim folder/file
    

    and rather obviously it was looking for the folder in the folder and failing to save.

提交回复
热议问题