diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 9884056354611ffff9cc77674f00e878a6bd01b8..d126971a0568efd02e0eb67db9c6df00d27fc691 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -23,6 +23,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##############################################################################
 from spack import *
+import os
 
 
 class Dealii(CMakePackage):
@@ -203,12 +204,22 @@ def cmake_args(self):
 
         # since Netcdf is spread among two, need to do it by hand:
         if '+netcdf' in spec:
+            # take care of lib64 vs lib installed lib locations:
+            if os.path.isdir(spec['netcdf-cxx'].prefix.lib):
+                netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib
+            else:
+                netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib64
+            if os.path.isdir(spec['netcdf'].prefix.lib):
+                netcdf_lib_dir = spec['netcdf'].prefix.lib
+            else:
+                netcdf_lib_dir = spec['netcdf'].prefix.lib64
+
             options.extend([
                 '-DNETCDF_FOUND=true',
                 '-DNETCDF_LIBRARIES=%s;%s' % (
-                    join_path(spec['netcdf-cxx'].prefix.lib,
+                    join_path(netcdfcxx_lib_dir,
                               'libnetcdf_c++.%s' % dso_suffix),
-                    join_path(spec['netcdf'].prefix.lib,
+                    join_path(netcdf_lib_dir,
                               'libnetcdf.%s' % dso_suffix)),
                 '-DNETCDF_INCLUDE_DIRS=%s;%s' % (
                     spec['netcdf-cxx'].prefix.include,