I am moving from Jessie to newer version Stretch followed this What is the latest sources.list for Raspbian?. I successfully update and upgrade. However, when I installed the raspberrypi-ui-mods and got this error.
dpkg: error while cleaning up:
unable to remove newly-extracted version of `/usr/share/icons/gnome/256x256/emotes/face-wink.png`: Read-only file system
dpkg: error while cleaning up:
unable to remove newly-extracted version of `/usr/share/icons/gnome/256x256/emotes/face-uncertain.png`: Read-only file system
...
dpkg: error while cleaning up:
unable to remove newly-extracted version of `/usr/share/icons/gnome/256x256/emotes/face-glasses.png`: Read-only file system
E: could not create temporary file for /var/lib/apt/extended_states - mkstemp(30: Read-only file system)
E: could not open file /var/lib/apt/extended_states - open(2: No such file or directory)
E: Failed to open StateFile /var/lib/apt/extended_states
Here is the full error image https://ibb.co/FXgkqYW
Here is my code in /etc/apt/sources.list
and /etc/apt/sources.list.d/raspi.list
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi firmware
...
deb http://archive.raspberrypi.org/debian/ stretch main ui
...
Any idea how to fix it? Thanks in advance.