debian-squeeze: squeeze generic_debian
lenny: install_pgsql_client_debs_83 install_extra_debs
squeeze: install_pgsql_client_debs_84 install_extra_debs_squeeze
-generic_debian: install_debs install debian_sys_config install_cpan_force
+generic_debian: install_debs test_for_libdbi_pkg install debian_sys_config install_cpan_force
ubuntu-hardy: hardy generic_ubuntu
ubuntu-lucid: lucid generic_ubuntu
hardy: install_pgsql_client_debs_82 install_yaz install_cpan_marc install_extra_encode
lucid: install_pgsql_client_debs_84 install_extra_debs
-generic_ubuntu: install_debs install debian_sys_config install_cpan_more install_cpan_safe install_cpan_force
+generic_ubuntu: install_debs test_for_libdbi_pkg install debian_sys_config install_cpan_more install_cpan_safe install_cpan_force
# - COMMON TARGETS ---------------------------------------------------------
fi;
cd $(LIBJS_PERL) && perl Makefile.PL -E4X -JS_THREADSAFE && make && make test && make install
+# On Ubuntu and possibly Debian, the libdbi0 package prevents the
+# compiled-from-source version from being used and breaks the install.
+# This package might get installed depending on the install-time choices
+# for the distro. Test for its existence; if it's there, throw an error
+# message and exit.
+test_for_libdbi_pkg:
+ @if [ "$$(apt-cache policy libdbi0 | grep Installed | grep none | wc -l)" -eq 0 ]; then \
+ echo "*** Detected locally installed libdbi0 package; you must remove this"; \
+ echo "*** with a command like 'aptitude remove libdbi0' before proceeding"; \
+ echo "*** to successfully install Evergreen."; \
+ echo; \
+ echo "*** Note: this may break other applications on your system."; \
+ exit 0; \
+ fi;
# Install libdbi and the postgres drivers
install_libdbi: