
Day 6: installing Google Earth. During the initial setup of the machine, I put on a package called “googleearth-package”. Then I found out today that it wasn’t Google Earth itself, but it would construct a Debian package from Google’s installer. Going to Google’s download page <https://www.google.com/earth/download/ge/agree.html>, I found there was already a .deb file. So I thought, fine, I don’t need this “googleearth-package”, I can just download that and install it. It put a bunch of files into /opt/google/earth/free, including an ELF executable (/opt/google/earth/free/googleearth-bin) and a wrapper shell script (/opt/google/earth/free/googleearth and /opt/google/earth/free/google-earth, with one being a symlink to the other so either name will work). But when I tried executing the wrapper script, it kept saying that /opt/google/earth/free/googleearth-bin could not be found. Aha, I thought: I’ve come across this before. First step: check that the executable file actually has executable permissions--yes it does. Second step, use the “ldd” command to verify that it can find all the necessary shared libraries. This looked fine, too, once I’d figured out that the LD_LIBRARY_PATH environment variable needed to point to the containing /opt/google/earth/free/ directory (which the wrapper script took care of). So why the “not found” error? Naturally I did a search online. One of the suggestions was to install the lsb-core package. In the process of doing that, I discovered I had some broken package dependencies which I first had to fix up with “apt-get -f install”. And it worked! Google Earth would now launch. Diagnosis: the ELF executable could find all its immediate dependencies, but some of those libraries in turn needed other dependencies that they could not find. (Odd that ldd didn’t report any such issues, though--that command is supposed to behave almost exactly like running the executable.) I was thinking that Google had an improperly built .deb file that did not correctly report that it needed lsb-core installed as well. But maybe it was just those broken dependencies... And maybe it’s the job of the “googleearth-package” package to take care of all these issues for you...