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

后端 未结 13 782
一生所求
一生所求 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:49

    It might be possible that the file you are accessing has a swap copy (or swap version) already there in the same directory

    Hence first see whether a hidden file exists or not.

    For example, see for the following type of files

    .system.conf.swp
    

    By using the command

    ls -a
    

    And then, delete it using ...

    rm .system.conf.swp
    

    Usually, I recommend to start using super user privileges using ...

    sudo su
    

提交回复
热议问题