Does the screen show you have "Close" relations with the civilization(s) with which you are trying to ally?
That plus the both having the tech are the most critical pieces. After that, it takes time.
On treaties, IIRC, a civilization can give only one Research and one Economic treaty. If you have given the Research Treaty to, say, the Drengins, then you will not show it as available to give to, say, the Korath. The AIs civs have the same limitations.
Check the screen that has the colored lines showing trade and treaties (and red for war). That picture will let you see what is going on in treaties. For example, if the Terrans have given Research Treaty to Altair and Economic to Torians, than they have no treaty to give so the screen with them will not show either as available.
You can also get some insight possibly at the Relations screen, looking for ++, +, and -, -- symbols to check what might be stopping "Close."