Que pacote fornece o -lGL no Ubuntu 18.04?

1

Estou tentando instalar o pip3 python package wxpython , que falha devido a

g++ -shared -fPIC -o /tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/libwx_gtk3u_gl-3.0.so.0.4.0  gldll_glcmn.o gldll_glx11.o gldll_gtk_glcanvas.o    -L/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib   -Wl,-soname,libwx_gtk3u_gl-3.0.so.0  -pthread         -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lX11 -lXxf86vm -lSM -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lpng -lz -ljpeg -ltiff  -lwxregexu-3.0  -pthread   -Wl,--version-script,/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/version-script -lz -ldl -lm  -lwx_gtk3u_core-3.0 -lwx_baseu-3.0  -lGL -lGLU -lz -ldl -lm
(cd /tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/; rm -f libwx_gtk3u_html-3.0.so libwx_gtk3u_html-3.0.so.0; ln -s libwx_gtk3u_html-3.0.so.0.4.0 libwx_gtk3u_html-3.0.so.0; ln -s libwx_gtk3u_html-3.0.so.0 libwx_gtk3u_html-3.0.so)
(cd /tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/; rm -f libwx_gtk3u_stc-3.0.so libwx_gtk3u_stc-3.0.so.0; ln -s libwx_gtk3u_stc-3.0.so.0.4.0 libwx_gtk3u_stc-3.0.so.0; ln -s libwx_gtk3u_stc-3.0.so.0 libwx_gtk3u_stc-3.0.so)
(cd /tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/; rm -f libwx_gtk3u_webview-3.0.so libwx_gtk3u_webview-3.0.so.0; ln -s libwx_gtk3u_webview-3.0.so.0.4.0 libwx_gtk3u_webview-3.0.so.0; ln -s libwx_gtk3u_webview-3.0.so.0 libwx_gtk3u_webview-3.0.so)
/usr/bin/x86_64-linux-gnu-ld: -lGL kann nicht gefunden werden
collect2: error: ld returned 1 exit status
Makefile:16113: recipe for target '/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/libwx_gtk3u_gl-3.0.so.0.4.0' failed
make: *** [/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/libwx_gtk3u_gl-3.0.so.0.4.0] Error 1
make: *** Auf noch nicht beendete Prozesse wird gewartet …
(cd /tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib/; rm -f libwx_gtk3u_adv-3.0.so libwx_gtk3u_adv-3.0.so.0; ln -s libwx_gtk3u_adv-3.0.so.0.4.0 libwx_gtk3u_adv-3.0.so.0; ln -s libwx_gtk3u_adv-3.0.so.0 libwx_gtk3u_adv-3.0.so)
g++ -o wxrc wxrc_wxrc.o    -L/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/lib  -pthread     -lwx_baseu_xml-3.0 -lexpat -lwx_baseu-3.0     -lwxregexu-3.0  -pthread   -Wl,--version-script,/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/version-script -lz -ldl -lm  -lz -ldl -lm
make[1]: Verzeichnis „/tmp/pip-build-c0hbjq4b/wxpython/build/wxbld/gtk3/utils/wxrc“ wird verlassen
Error building
ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build.py", line 1295, in cmd_build_wx
    wxbuild.main(wxDir(), build_options)
  File "/tmp/pip-build-c0hbjq4b/wxpython/buildtools/build_wxwidgets.py", line 498, in main
    exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")
  File "/tmp/pip-build-c0hbjq4b/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError
    raise builder.BuildError(msg)
buildtools.builder.BuildError: Error building
Finished command: build_wx (3m27.477s)
Finished command: build (3m27.478s)
Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.

----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-c0hbjq4b/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-dt7af70p-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-c0hbjq4b/wxpython/

libgl-dev refere-se a libgl1-mesa-dev , que já está instalado, bem como libglw1-mesa-dev , que parece ser o único outro candidato possível com base na conclusão automática de sudo apt-get install libgl .

A instalação com pip para o Python 2.x é bem-sucedida.

    
por Karl Richter 30.04.2018 / 16:54

2 respostas

1

São duas perguntas. Se eu tirar sua pergunta literalmente, uma abordagem seria usar apt-file para procurar pacotes contendo o arquivo que você está procurando:

$ apt-file search libGL.so
libgl1: /usr/lib/x86_64-linux-gnu/libGL.so.1
libgl1: /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
libglvnd-dev: /usr/lib/x86_64-linux-gnu/libGL.so
nvidia-340: /usr/lib/i386-linux-gnu/libGL.so
nvidia-340: /usr/lib/i386-linux-gnu/libGL.so.1
nvidia-340: /usr/lib/i386-linux-gnu/libGL.so.340.106
nvidia-340: /usr/lib/x86_64-linux-gnu/libGL.so
nvidia-340: /usr/lib/x86_64-linux-gnu/libGL.so.1
nvidia-340: /usr/lib/x86_64-linux-gnu/libGL.so.340.106
primus-libs: /usr/lib/x86_64-linux-gnu/primus/libGL.so.1
virtualbox-guest-x11: /usr/lib/virtualbox/additions/libGL.so
virtualbox-guest-x11: /usr/lib/virtualbox/additions/libGL.so.1
virtualbox-guest-x11-hwe: /usr/lib/virtualbox/additions/libGL.so
virtualbox-guest-x11-hwe: /usr/lib/virtualbox/additions/libGL.so.1

Se você não tem o apt-file instalado, instale-o e inicialize seu banco de dados primeiro usando:

$ sudo apt install apt-file
$ sudo apt-file update

Para verificar se o linker pode realmente encontrar a biblioteca instalada, execute isto:

$ ldconfig -p | grep libGL.so
libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so.1
libGL.so.1 (libc6) => /usr/lib/i386-linux-gnu/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so

Por que o wxPython build usando o pip3 não está pegando nenhum deles é uma pergunta que não posso responder.

    
por Sebastian Stark 27.05.2018 / 10:52
0

Eu tive o mesmo problema. O apt disse que libgl1-mesa-dev já estava instalado, mas não consegui encontrar um pacote em /var/cache/apt .

Isso ajudou:

sudo apt-get remove --purge libgl1-mesa-dev

(Depois disso, NÃO faça um sudo apt autoremove .)

sudo apt-get install libgl1-mesa-dev

Depois que essa compilação funcionou.

    
por Martin 05.05.2018 / 19:37