问题
I am running Ubuntu 18.04 on an AWS EC2 instance. I activate conda
virtual environment and try to install several packages.
During installation of mujoco-py I get:
/home/ubuntu/anaconda3/envs/tensorflow_p36/compiler_compat/ld: cannot find -lOSMesa
/home/ubuntu/anaconda3/envs/tensorflow_p36/compiler_compat/ld: cannot find -lGL
/home/ubuntu/anaconda3/envs/tensorflow_p36/compiler_compat/ld: cannot find -lpthread
/home/ubuntu/anaconda3/envs/tensorflow_p36/compiler_compat/ld: cannot find -lc
collect2: error: ld returned 1 exit status
and followed by:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/python3.6/distutils/unixccompiler.py", line 197, in link
self.spawn(linker + ld_args)
File "/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
This has been a common occurrence throughout my experience with this instance.
How can I check where the libraries actually are to ensure that these are found by ld
(the GNU linker) ?
Any suggestions would be appreciated.
来源:https://stackoverflow.com/questions/59011285/aws-ec2-ubuntu-instance-giving-ld-cannot-find-library-error-during-installatio