compiling OpenGL program GL/glew.h missing - linux

I installed OpenGL onto my computer running Linux Mint following the instructions on this tutorial. I am trying to compile a program that uses OpenGL, but I'm getting a compile error: fatal error: GL/glew.h: No such file or directory. I check the /usr/include/GL folder, and glew.h is indeed missing. I don't know why it's missing, because I did the command sudo apt-get install libglew1.5 and it gives the output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libglew1.5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 465 not upgraded.
Why is the glew.h file missing?

libglew is just the library, but not the development files (headers). You need to install those separately. The package name on Debian based systems is libglew-dev
and for fedora(and possibly its derivatives) it is glew-devel

Run the following command:
sudo apt-get install libglew-dev

Related

E: Unable to locate package arm-none-eabi-gcc

I'm working on a project in which I've to compile a MicroPython stack and build a firmware file for my STM32 boards. At present, I'm following through the instruction set given on https://docs.micropython.org/en/latest/develop/gettingstarted.html. Hence, to compile the code, I need an ARM cross-compiler (mentioned on the website). After entering the following command on the terminal "sudo apt-get install arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib", I'm getting some errors (basically, unable to locate packages). I tried googling a lot but didn't come across any relevant links. Does anyone know what I need to do?
My pc configurations are AMD Ryzen 5 processor (IdeaPad 3 15ALC6), and I'm using Ubuntu 22.04.1 LTS OS. The snippet of the error is given below:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package arm-none-eabi-gcc
E: Unable to locate package arm-none-eabi-binutils
E: Unable to locate package arm-none-eabi-newlib
I found the solution based on the discussion available at https://unix.stackexchange.com/questions/377345/installing-arm-none-eabi-gcc and the documentation available on https://mynewt.apache.org/latest/get_started/native_install/cross_tools.html#installing-the-arm-cross-toolchain.
The name and structure of the software changed over time. The arm-none-eabi-gcc is gcc-arm-none-eabi now, and so on.
$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install gcc-arm-none-eabi
$ sudo apt-get install gdb-arm-none-eabi
And finally, to verify the downloads, you can run the following commands:
arm-none-eabi-gcc --version
arm-none-eabi-g++ --version
arm-none-eabi-size --version
In /etc/apt/sources.list, make sure the lines with universe are uncommented.
Re-run apt update and (as long as you have a working internter connection) it should work.

How to install libprotobuf?

By mistake i have deleted these libraries. I couldn't find a right way to reinstall it.
/usr/lib/x86_64-linux-gnu/libprotobuf.so.8
/usr/lib/x86_64-linux-gnu/libprotobuf-c.so.0
To fix it, i tried to follow these instructions, https://github.com/google/protobuf/blob/master/src/README.md
but ended up with different version. Now while compiling my code it throws this error. How can i get my previous version back?
error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
Unknown OS: Installing the three packages providing libprotobuf.so.8, libprotobuf-c.so.0, libprotoc.so.8 →
sudo apt install --reinstall libprotobuf8 libprotobuf-c0 libprotoc8
HOWTO decide a package :
sudo apt install apt-file
apt-file search libprotoc.so.8
http://packages.ubuntu.com/search?keywords=libprotoc&searchon=names

Linux - Qmake Compiling Error - 'vorbisfile not found' although installed

I try to compile Goldendict on Debian. I have installed all the necessary dependencies, including libvorbis-dev, as listed in the 'README.md' file. However, I'm immediately running into the following error message when executing qmake or qmake-qt4.
JohnDoe#debian:~/goldendict$ qmake
Project MESSAGE: Install Prefix is: /usr/local
sh: 1: pkg-config: not found
Project ERROR: Package vorbisfile not found
JohnDoe#debian:~/goldendict$
I have tried to install it without the audio player support, but it's not working either.
JohnDoe#debian:~/goldendict$ sudo qmake "DISABLE_INTERNAL_PLAYER=1"
Project MESSAGE: Install Prefix is: /usr/local
sh: 1: pkg-config: not found
Project ERROR: Package vorbisfile not found
JohnDoe#debian:~/goldendict$
I have Qt version 4.8.6 installed.
Here are the instructions on 'how-to install Goldendict', which I have followed: https://github.com/goldendict/goldendict/blob/master/README.md
How can I get this work? Any help is welcome.
PS: Here's the proof that the vorbis package is installed.
PROOF from dpkg:
JohnDoe#debian:~$ dpkg -s libvorbis-dev
Package: libvorbis-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 1715
Maintainer: Debian Xiph.org Maintainers <pkg-xiph-maint#lists.alioth.debian.org>
Architecture: amd64
Multi-Arch: same
Source: libvorbis
Version: 1.3.4-2
Depends: libogg-dev, libvorbis0a (= 1.3.4-2), libvorbisenc2 (= 1.3.4-2), libvorbisfile3 (= 1.3.4-2)
PROOF from apt-get:
JohnDoe#debian:~/goldendict$ sudo apt-get install libvorbis-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libvorbis-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
JohnDoe#debian:~/goldendict$
Not on Debian, but on Mac it was a problem. The workaround is, you can change your .pro file for Qt projects, so that it does not look for pkg-config, by adding the following line:
QT_CONFIG -= no-pkg-config
Another guess would be that your path is not set properly. I would try adding the pkg-config path to the environment variable:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/<path_to_pkg-config>/pkgconfig

E: Package 'gdb-arm-linux-gnueabi' has no installation candidate

I try to install gdb-ARM for cross compile on my ubuntu 14.04 x86 architecture . I want to debug a program on my target with an ARM architecture.I tried this command :
sudo apt-get install gdb-arm-linux-gnueabi
I got this error :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gdb-arm-linux-gnueabi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gdb-arm-linux-gnueabi' has no installation candidate
any help please ?
You may want to try sudo apt install binutils-mips64el-linux-gnuab or sudo apt install gdb-arm-none-eabi

System crash after oracle installation with yum

recently i tried to install oracle on my linux with apt (I never used yum before) using fast manual:
http://www.oracle.com/technetwork/articles/servers-storage-admin/ginnydbinstallonlinux-488779.html
And after command:
sudo yum install oracle-rdbms-server-11gR2-preinstall
I got error:
Failed: ca-certificates.noarch 0:2010.63-3.el6_1.5 chkconfig.x86_64 0:1.3.49.3-2.el6 file-libs.x86_64 0:5.04-15.el6 filesystem.x86_64 0:2.4.30-3.el6
initscripts.x86_64 0:9.03.38-1.0.1.el6_4.2
Complete!
And something gone wrong because command like: ps, top are crashing
login#Ass-K55VJ:/etc/yum/repos.d$ ps -e
ps: relocation error: ps: symbol procps_number_version, version _3_2_5 not defined in file libproc-3.2.8.so with link time reference
login#Ass-K55VJ:/etc/yum/repos.d$ top
Segmentation fault (core dumped)
then I tryied to uninstall oracle and dependencies but after command:
sudo yum remove oracle-rdbms-server-11gR2-preinstall
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jul 10 2013, 06:42:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq
So it seems like yum install in my system new libraries but didn't link it correctly? I dont know what do in this moment because it seems like armagedon on my ubuntu...
Does this mean you're on ubuntu and tried to install rpm packages using yum? The manual you used is for Oracle Linux 6, why would you try that on ubuntu?
rpm packages are not compatible with debian based systems like ubuntu, which use deb packages. So you've probably screwed your system big time, overwriting important system libraries with incompatible ones.
If apt-get is still working, then you can try to reinstall (apt-get --reinstall install) the equivalent libraries to the ones mentioned in the install manual you linked to - naming isn't always the same for rpm and deb packages. dpkg -l should help you see which the correct installed libraries are. I'd start with the C libraries (libc) etc.
But if apt-get is screwed also, then you'd need to download the packages manually from an ubuntu mirror and install them using dpkg, but I think a reinstall (or restore from backup if you have one) would be the best option.

Resources