diff --git a/debian-template/postinst b/debian-template/postinst
index 94a06ff88b210d3b741aa356b8013dca2035029f..c2e4acd46cd609650a68b3f88373e8ea24692f54 100644
--- a/debian-template/postinst
+++ b/debian-template/postinst
@@ -10,7 +10,7 @@ if [ "$1" = "configure" ] && [ -z "$2" ]; then
         addgroup --quiet --system smasch
     fi
 
-    ln -s /etc/smasch/smasch.py /usr/lib/smasch/smash/local_settings.py
+    ln -sf /etc/smasch/smasch.py /usr/lib/smasch/smash/local_settings.py
 
     virtualenv --python=python3 /usr/lib/smasch/env
 
@@ -24,9 +24,17 @@ if [ "$1" = "configure" ] && [ -z "$2" ]; then
 
 fi
 
-echo "Instal python dependencies"
-source /usr/lib/smasch/env/bin/activate && pip install -r /usr/lib/smasch/requirements.txt --log $LOG_FILE
-source /usr/lib/smasch/env/bin/activate && pip install -r /usr/lib/smasch/requirements-dev.txt  --log $LOG_FILE
+echo "Installing python dependencies"
+{
+  source /usr/lib/smasch/env/bin/activate && pip install -r /usr/lib/smasch/requirements.txt --log $LOG_FILE
+  source /usr/lib/smasch/env/bin/activate && pip install -r /usr/lib/smasch/requirements-dev.txt  --log $LOG_FILE
+} || {
+  echo "There was an issue when installing python dependencies." >> $LOG_FILE
+  echo "There was an issue when installing python dependencies. Reinstall of smasch could help (in case you are upgrading smasch the data should not be lost in the process): "
+  echo "apt-get remove smasch"
+  echo "apt-get install smasch"
+  exit 1
+}
 
 echo "Collecting static files"
 source /usr/lib/smasch/env/bin/activate && /usr/lib/smasch/manage.py collectstatic --no-input >> $LOG_FILE 2>&1