The usual updates
Before loading the software components it is good practice to ensure that the distro is updated, so it has all the newest versions of all packages currently installed on the system from the source repo:
sudo apt-get update
sudo apt-get upgrade
sudo shutdown -r now
The upgrade command is used to install the newest versions of all packages that are currently installed on the Pi. An update command is performed first so that apt-get knows if new versions of packages are available for upgrade. Restarting an OS after major changes will help in the long run. It make troubleshooting problems easier. Performing a number of tasks on an OS before rebooting creates the difficultly of trying to determine what change may have caused the error.