AWS EC2 Ubuntu instance giving “ld cannot find library” error during installation procedure

会有一股神秘感。 提交于 2019-12-11 15:49:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!