There is a problem with that sed command. -e needs a file not an expression.
Do the "# enable debug symbols, disable optimisations" as two parts: a. sed -i '/^COPTS/ s/# -g/-g #/' Makefile b. sed -i '/^COPTS/ s/ -O2//' Makefile
Make sure you copy and paste these commands. There is a space in s/ -O2// (an option is being removed hence a space needs to be removed also.)
There is a problem with that sed command. -e needs a file not an expression.
Do the "# enable debug symbols, disable optimisations" as two parts:
a. sed -i '/^COPTS/ s/# -g/-g #/' Makefile
b. sed -i '/^COPTS/ s/ -O2//' Makefile
Make sure you copy and paste these commands. There is a space in s/ -O2// (an option is being removed hence a space needs to be removed also.)