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

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

    I got this error when I used git rm on a file in a directory.

    I was in something like ~/gitRepo/code/newFeature

    In newFeature there was only one file. I did a git rm on that file then tried to create a new file myNewFile using vi.

    Ubuntu showed me as still being inside the newFeature directory but actually git rm had removed the whole directory.

    I had to exit out of vi, navigate up one directory and then recreate the newFeature directory.

提交回复
热议问题