diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c2dc6965baf80ac68935269cf08c6cd7d409fb5f..504fc5948e4f6fbe5032304355f4a4ae1f00b4c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,9 +28,6 @@ before_script:
   - cd ..
 
 # compile pyswiftsim
-  - echo $LD_LIBRARY_PATH
-  - cat swiftsim/config.h
-  - locate hdf5
   - python3 setup.py install --with-swift $LHOME/swiftsim --user
 
 # compile the docs
diff --git a/setup.py b/setup.py
index 62a38d6006d0bd59d22d2e1efdd3254612664d7c..756f77eb87db98c0014f9d047240c5aaf9e995ca 100644
--- a/setup.py
+++ b/setup.py
@@ -101,6 +101,8 @@ lib_dir = []
 if swift_path:
     lib_dir.append(swift_path + "/src/.libs")
     lib_dir.append(hdf5_root + "/lib")
+    # fix for default install of hdf5
+    lib_dir.append(hdf5_root + "/lib/x86_64-linux-gnu/hdf5")
 
 #  src files
 c_src = []