Fix #1517, #1521 by adding sudo to examples and installation.