ERR_print_errors_fp(stderr); in my program display this message:
984:error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not
seeded:md_rand.c:503:You need to read the OpenSSL FAQ,
http://www.openssl.org/support/faq.html

984:error:04069003:rsa routines:RSA_generate_key:BN lib:rsa_gen.c:182:

I read http://www.openssl.org/support/faq.html but still can't fix the
error.

This perl program show that /dev/random is ok.
$random = rand();
print "$random\n";

I tried this for my main program but it still can't fix the error:
int main( int argc, char **argv )
{
SSL_library_init();
char buf[256];
RAND_add(buf, sizeof(buf), 0.0);
...
}

Openssl is 0.9.7d.

My computer is solaris x86:
SunOS 5.10 Generic_120012-14 i86pc i386 i86pc