A while back I got this interesting error when Installing a package into a newly installed copy of Delphi 2010 saying “required package rtl not found”. I recall having had this problem before once when I had Delphi 2009 and 2010 installed at the same time, it just so happens that now I had 2010 and XE installed. Here’s an easy solution to the problem:
Add “$(BDS)\lib” and “$(BDSCOMMONDIR)\dcp” to your library path. This solution will probably only work for later versions of Delphi, though for all versions it should simply be a matter of adding your lib path and dcp output path to the library path.
In my case the cause of this problem is fairly simple. Whenever you install Delphi, the installer will set up all paths like the library path in the windows registry. However, if a path is already present, it will use that, since the user might just be reinstalling the IDE and wouldn’t want to loose their settings. Some component installers allow you to install the components for IDE’s that aren’t actually installed on your computer yet, they will append their library paths to the non-existing path for the IDE which means they will simply create it. This results in a library path that does not contain any of the paths to the standard VCL library and components included with Delphi.
A less delicate solution to this problem would be to just erase all registry content for the version of Delphi you’re trying to install and then install it. This will ensure you have all paths set up correctly, because the previous solution will only ensure VCL works correctly, not the components that come with the IDE like the Indy library. The registry values for the IDEs are located in HKEY_CURRENT_USER\Software\Borland for old releases, HKEY_CURRENT_USER\Software\CodeGear for all releases up to Delphi 2010 and HKEY_CURRENT_USER\Software\Embarcadero for XE and newer.