'sudo apt-get install' is showing "Not using locking for read only file /var/lib/dpkg/lock" warning on Ubuntu Touch

I just installed Ubuntu Touch on my Nexus 7.

Unfortunately I can't install anything from the terminal app:

If I enter:

sudo apt-get install yasm -y git make g++ build-essential libminiupnpc-dev

I get:

W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.

I've rebooted the device but wasn't successful yet. What should I do to fix the error?


Warning: This is by design. What you're trying to do can very quickly make your device unusable. Phones, which are updated by apt-get upgrade for example, are not tested; only the ones using the OTA update system are. If your phone breaks, you may need to re-flash it. If you understand the risk, then see below.

To remount the root filesystem as read/write, run the following command

sudo mount -o remount,rw /