AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 497866
Accepted
mend4x
mend4x
Asked: 2019-01-31 23:32:21 +0800 CST2019-01-31 23:32:21 +0800 CST 2019-01-31 23:32:21 +0800 CST

não é capaz de compilar código OpenGL

  • 772

Estou executando o Linux Mint 19.1 no meu laptop e enfrentando esse problema. Quando tento compilar o programa C++ com bibliotecas OpenGL, ele diz:

$ make
g++     solsys.cpp  -lglut -lGLEW -lGL -lGLU -fpermissive -o solsys
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'solsys' failed
make: *** [solsys] Error 1

Quando tento executar programas já compilados antes, mas nesta máquina diz

./rotation: error while loading shared libraries: libGLEW.so.1.13: cannot open shared object file: No such file or directory

Eu realmente entendo que o problema está na instalação incorreta de bibliotecas, mas não consigo resolvê-lo.

glxino | grep OpenGLproduz isso

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

A propósito, tenho problemas com a instalação de drivers da Nvidia no meu laptop, mas desisti.

$lspci | grep "NVIDIA"
04:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)

ATUALIZAR:

$ sudo apt-get install libglew-dev libgl1-mesa-dev libglu1-mesa-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libglu1-mesa-dev is already the newest version (9.0.0-2.1build1).
libglu1-mesa-dev set to manually installed.
libglew-dev is already the newest version (2.0.0-5).
libgl1-mesa-dev is already the newest version (18.0.5-0ubuntu0~18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.

...

$ dpkg -l | grep mesa
ii  libegl-mesa0:amd64                         18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the EGL API -- Mesa vendor library
ii  libegl1-mesa:amd64                         18.0.5-0ubuntu0~18.04.1                     amd64        transitional dummy package
ii  libegl1-mesa-dev:amd64                     18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the EGL API -- development files
ii  libgl1-mesa-dev:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL API -- GLX development files
ii  libgl1-mesa-dri:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                       18.0.5-0ubuntu0~18.04.1                     i386         free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        transitional dummy package
ii  libgl1-mesa-glx:i386                       18.0.5-0ubuntu0~18.04.1                     i386         transitional dummy package
ii  libglapi-mesa:amd64                        18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the GL API -- shared library
ii  libglapi-mesa:i386                         18.0.5-0ubuntu0~18.04.1                     i386         free implementation of the GL API -- shared library
ii  libgles2-mesa:amd64                        18.0.5-0ubuntu0~18.04.1                     amd64        transitional dummy package
ii  libgles2-mesa-dev:amd64                    18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL|ES 2.x API -- development files
ii  libglu1-mesa:amd64                         9.0.0-2.1build1                             amd64        Mesa OpenGL utility library (GLU)
ii  libglu1-mesa:i386                          9.0.0-2.1build1                             i386         Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:amd64                     9.0.0-2.1build1                             amd64        Mesa OpenGL utility library -- development files
ii  libglx-mesa0:amd64                         18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL API -- GLX vendor library
ii  libglx-mesa0:i386                          18.0.5-0ubuntu0~18.04.1                     i386         free implementation of the OpenGL API -- GLX vendor library
ii  libosmesa6:amd64                           18.0.5-0ubuntu0~18.04.1                     amd64        Mesa Off-screen rendering extension
ii  libosmesa6:i386                            18.0.5-0ubuntu0~18.04.1                     i386         Mesa Off-screen rendering extension
ii  libwayland-egl1-mesa:amd64                 18.0.5-0ubuntu0~18.04.1                     amd64        implementation of the Wayland EGL platform -- runtime
ii  mesa-common-dev:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        Developer documentation for Mesa
ii  mesa-utils                                 8.4.0-1                                     amd64        Miscellaneous Mesa GL utilities

ligação:

$ ls -l /usr/lib/x86_64-linux-gnu/libGL.so*
lrwxrwxrwx 1 root root     14 Jan 16 19:09 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 567624 Aug 15 12:20 /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
linux-mint opengl
  • 1 1 respostas
  • 416 Views

1 respostas

  • Voted
  1. Best Answer
    mend4x
    2019-02-14T07:34:43+08:002019-02-14T07:34:43+08:00

    Eu decidi perguntar sobre isso no Nvidia Forum e obtive uma resposta. Eu deixaria aqui um tópico completo para que qualquer um pudesse entender a coisa toda em torno dele.

    • 0

relate perguntas

  • Atualizar libinput no Linux Mint

  • linux java -version funciona apenas para usuário root [fechado]

  • Qual é o procedimento correto para substituir o MDM pelo LightDM no Linux Mint?

  • Danos no kernel do Linux Mint

  • Configurações de Arquivo do Gerenciador de Pacotes Synaptic

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve