Have you tried using stats::cor? It worked for me. WGCNAs uses a faster version of cor but it´s probably missing a dependency.