/usr/bin/ld: cannot find -lGL Xubuntu 12.10 AMD open source - linux

I am trying to compile the example from the following website: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/
At first CMake was unable to find libGL.so, so I pointed it to where the lib is (/usr/lib/x86_64-linux-gnu/mesa/libGL.so) in the txt file. After that I tried make all and this gave me the following error: /usr/bin/ld: cannot find -lGL. According to what I found this means that ld is unable to find libGL.so, but if I type locate libGL I get the following response:
/home/jacko/.local/share/Steam/SteamApps/common/Cave Story+/lib/libGLU.so.1
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libGLEW.so.1.6
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libGLEW.so.1.6.0
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libGLU.so.1
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libGLU.so.1.3.08004
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/share/doc/nvidia-cg-toolkit/examples/Tools/trace/libGL.so.1.gz
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libGLEW.so.1.6
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libGLEW.so.1.6.0
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libGLU.so.1
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libGLU.so.1.3.08004
/home/jacko/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/share/doc/nvidia-cg-toolkit/examples/Tools/trace/libGL.so.1.gz
/opt/cave-story-plus/lib64/libGLU.so.1
/usr/lib/i386-linux-gnu/libGLU.so.1
/usr/lib/i386-linux-gnu/libGLU.so.1.3.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/libGLU.a
/usr/lib/x86_64-linux-gnu/libGLU.so
/usr/lib/x86_64-linux-gnu/libGLU.so.1
/usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/qtcreator/libGLSL.so
/usr/lib/x86_64-linux-gnu/qtcreator/libGLSL.so.1
/usr/lib/x86_64-linux-gnu/qtcreator/libGLSL.so.1.0
/usr/lib/x86_64-linux-gnu/qtcreator/libGLSL.so.1.0.0
/usr/lib/x86_64-linux-gnu/qtcreator/plugins/Nokia/libGLSLEditor.so
/usr/lib32/libGL.so
Which looks to me like libGL is fully available.
also:
~$ sudo apt-get install libgl1-mesa-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgl1-mesa-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I am running Xubuntu 12.10 with opensource AMD drivers.

If anyone else encounters this too: the symlinks between /usr/lib/x86_64-linux-gnu/libGL.so and /usr/lib/x86_64-linux-gnu/mesa/libGL.so was gone. I did sudo apt-get remove --purge libgl1-mesa-dev and sudo apt-get install ibgl1-mesa-dev* libglu1-mesa-dev* libqt4-opengl-dev* qt-sdk* to fix this.

Maybe this simple script will help someone. The 1 answer helps me too but this script finish what was missing.
#!/bin/bash
DEPENDS='libx11-dev'
DEPENDS+=' libxmu-dev'
DEPENDS+=' libglu1-mesa-dev'
DEPENDS+=' libgl2ps-dev'
DEPENDS+=' libxi-dev'
DEPENDS+=' libglfw-dev'
DEPENDS+=' g++'
DEPENDS+=' libzip-dev'
DEPENDS+=' libglew*-dev'
MISSING=
echo "Checking for missing packages ..."
for i in $DEPENDS; do
if ! dpkg-query -W --showformat='${Status}\n' $i | grep "install ok installed" > /dev/null; then
MISSING+="$i "
fi
done
if [ -n "$MISSING" ]; then
TXTCOLOR_DEFAULT="\033[0;m"
TXTCOLOR_GREEN="\033[0;32m"
echo -e $TXTCOLOR_GREEN"Missing packages: $MISSING.\nYou may be asked for your password for package installation."$TXTCOLOR_DEFAULT
sudo apt-get --force-yes --yes install $MISSING
fi

Related

While I'm trying gcc make linux-headers-`uname -r` I'm getting error

I was trying to install droidcam Linux client. when I run the command
gcc make linux-headers-`uname -r`
I'm getting the following error:
gcc: error: make: No such file or directory
gcc: error: linux-headers-5.4.0-42-generic: No such file or directory
gcc: fatal error: no input files
compilation terminated.
I tried
sudo apt-get install linux-headers-`uname -r`
and this tells me it is already there.
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-5.4.0-42-generic is already the newest version (5.4.0-42.46).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
From this solution I just run this command yes | sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
and then followed the other steps described.

Unable to install kernel driver rpm during %post section kickstart RHEL7

I'm trying to install a custom driver rpm that I custom built. I have a kickstart file bundled into a RHEL7.2 iso with a %post section. In the %post, I have a yum install of the driver rpm which seems to get installed, but I notice that depmod logs fatal errors when the driver rpm gets installed:
Installing : kmod-xnxx-1.0-1_test.x86_64
depmod: FATAL: could not load 3.10.0-327.el7.x86_64: No such file or directory
warning: %post(kmod-xnxx-1.0-1_test.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package kmod-xnxx-1.0-1_test.x86_64
Verifying : kmod-xnxx-1.0-1_test.x86_64
Installed :
kmod-xnxx-1.0-1_test.x86_64
Complete!
As the rpm gets installed, it runs a depmod -a and dracut to rebuild the ramdisk. I'm not sure why these errors a re occurring during the anaconda post install? I've confirmed that the same kernel "3.10.0-327.el7.x86_64" is being used during the post so I have no idea why the module doesn't get installed correctly without the "depmod" errors. I recall from the past that the running kernel during the anaconda install has differences with the kernel that actually gets installed. I'm not sure if this is attributed to the issue I'm having with the post. Any suggestions on how to overcome this would be great. Thanks!
Below is the spec file that I'm using to build the kernel driver rpm(kmod) against kernel 3.10.0-327.el7.x86_64:
%define build_kernel 3.10.0-327.el7.x86_64
%define current_kernel %(uname -r)
%define destdir /lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/net/
Summary: driver
Name: kmod-xnxx
Version: 1.0
Release: 1_test
License: GPL
Group: Hardware driver
BuildArch: x86_64
BuildRoot: %{buildroot}
%description
Creating a xn4xx kernel module RPM
%prep
%install
mkdir -p %{buildroot}%{destdir}
if [ “%{build_kernel}” != “%{current_kernel}” ]; then
echo “This rpm is for %{build_kernel} kernel version. Ensure that you are using right module/kernel”
exit 1
fi
ls %{destdir} > /dev/null 2> /dev/null
if [ $? != 0 ]; then
echo “%{destdir} is not there. Unable to install the driver.”
exit 1
fi
install -m 644 %(pwd)/BUILD/xnxx.ko %{buildroot}%{destdir}xnxx.ko
%clean
rm -rf %{buildroot}
%post
/sbin/depmod -a %{current_kernel}
/sbin/dracut -v -f /boot/initramfs-%{current_kernel}.img %{current_kernel}
%files
%defattr(-,root,root)
%{destdir}xnxx.ko
%changelog

How to fix the broken package manager?

OS :debian8.
debian8#hwy:~$ sudo apt-get install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
Package manager tells python3 had been installed.
debian8#hwy:~$ python3
bash: python3: command not found
debian8#hwy:~$ sudo find / -name 'python3*'
Nothing output,how to fix the broken package manager?
The first command will show you if the package is installed
~$ dpkg -l python3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-==============-==============-============================================
ii python3 3.5.1-3 amd64 interactive high-level object-oriented langu
this command will show you the location of python3 program if is installed.
~$ which python3
/usr/bin/python3
re install the package you removed check I have 'ii' and you have 'ri'
apt install --reinstall python3
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
tar -xf Python-3.6.0.tar.xz
cd ./Python-3.6.0
sudo ./configure --prefix=/usr/local/python3.6 --with-ensurepip=install
sudo make
sudo make install
sudo ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3.6
sudo ln -s /usr/local/python3.6/bin/pip3.6 /usr/bin/pip3.6
All issues solved.

got error while download gattlib via pip3

I use Ubuntu 16.04 64bit OS
when I run
$ sudo pip3 install gattlib
I got this error message
/usr/bin/ld: cannot find -lboost_python-py34
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1
I tried googling how to solve this but nothing works for me
I want to use gatttool at python, so I need to install this
How can I solve this?
PS. I already downloaded libboost-dev
pip3 download gattlib
tar xvzf ./gattlib-0.20150805.tar.gz
cd gattlib-0.20150805/
sed -ie 's/boost_python-py34/boost_python-py35/' setup.py
pip3 install .
And for python 3.7 you should do:
pip3 download gattlib
tar xvzf ./gattlib-0.20150805.tar.gz
cd gattlib-0.20150805/
sed -ie 's/boost_python-py34/boost_python37/' setup.py
pip3 install .
If Benjamin's solution does not work, try changing 35 to 36. i.e. try the code below.
pip3 download gattlib
tar xvzf ./gattlib-0.20150805.tar.gz
cd gattlib-0.20150805/
sed -ie 's/boost_python-py34/boost_python-py36/' setup.py
pip3 install .
I was running in to the following error on RPI-3B:
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
src/gattservices.cpp:6:33: fatal error: bluetooth/bluetooth.h: No such file or directory
#include
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
[1] Running the following command helped me to resolve:
sudo apt-get install libbluetooth-dev
[2] Also deleting the folder 'gattlib-0.20150805' and recreating it using 'tar xvzf ...' again, helped cleaning the previous compilation left over files.
This works with Raspberry 2, Rasbian Buster and Python 3. Note that Python 3 libraries seems to have different naming “The bug can be solved easily by replacing boost_python_py34 with boost_python3 when specifying the boost libraries in setup.py.“
sed -ie 's/boost_python-py37/boost_python3/' setup.py
Libraries:
/usr/lib/arm-linux-gnueabihf/libboost_python3.a
/usr/lib/arm-linux-gnueabihf/libboost_python3-py37.a
/usr/lib/arm-linux-gnueabihf/libboost_python3-py37.so
/usr/lib/arm-linux-gnueabihf/libboost_python3.so
Following PyGattlib DEPENDS all dependencies include pkg-config to "manage compile and link flags for libraries". This solved
/usr/bin/ld: cannot find -lboost_python-py36
I updated my package install dependencies and it works !
RUN install_packages \
python3-dev \
libbluetooth-dev \
libboost-python-dev \
libboost-thread-dev \
libglib2.0-dev \
pkg-config
RUN python3 -m pip install pygattlib
Docker Balena.io
Ubuntu "bionic beaver"

How to install Petite Chez Scheme on Ubuntu?

How to install Petite Chez Scheme on Ubuntu?
I run Ubuntu 15.10 and try to install pcsv8.4-a6le.tar.gz (non-threaded, 64 bit) for Linux.
After having unpacked this tar in /usr/locale, I enter the commands
sudo ./configure
sudo make install
from within the custom directory.
However, instead of a clean install, I get the following errors (which I hope someone can help me out with):
nlykkei#nlykkei-Studio-XPS-1640:/usr/local/csv8.4/custom$ sudo make install
if [ yes = no ]; then if [ ! -f ./scheme ]; then /bin/rm -f ./scheme; ln -s ../bin/a6le/scheme ./scheme; fi; fi
if [ ! -f ./petite ]; then /bin/rm -f ./petite; ln -s ./scheme ./petite; fi
/bin/rm -f ./scheme
echo "const char *S_date_stamp = \"`date +%m%d%Y%H%M%S`\";" > datestamp.c
gcc -m64 -rdynamic -o ./scheme datestamp.c ../boot/a6le/kernel.o ../boot/a6le/custom.o -lm -ldl -lncurses -lrt
/usr/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
Mf-a6le:22: recipe for target 'scheme' failed
make[2]: *** [scheme] Error 1
Makefile:47: recipe for target 'buildpetite' failed
make[1]: *** [buildpetite] Error 2
Mf-install:64: recipe for target 'install' failed
make: *** [install] Error 2
On recent versions of Ubuntu (and future versions of Debian e.g. "Buster", and other Debian based distros), you can install Chez Scheme directly from the repo(s) by:
sudo apt install chezscheme
Previously you had to install it by compiling from source. Chez Scheme has been open source, for a few years now, and can be compiled from source, if it is not directly installable from the distribution's repo(s). Just download the source code compile and install. This will install not just the "petite" runtime version but also the full compiler. You can compile and install the software with:
./configure
sudo make install
Full build and install instructions are available here.
Pre-requisites for building are:
GNU Make
GCC
Header files and libraries for ncurses
Header files and libraries for X windows
On Ubuntu, install the libncurses5-dev package to get libncurses.so. (You can discover this by visiting http://packages.debian.org/file:libncurses.so (sadly, this doesn't seem to work for http://packages.ubuntu.com/file:libncurses.so).)
You may find other linkage errors if Chez requires other libraries to have development packages installed too. Use the same technique as above.
Go directly building from their Github.
ChezScheme
And then just do
./configure
sudo make install
Prerequisites according to Building are:
GNU Make
gcc
Header files and libraries for ncurses
Header files and libraries for X windows
And yes in case On Ubuntu, install the libncurses5-dev as Chris stated. Did just that and have no errors shown in clean install.
Chez Scheme has been open sourced since this question was asked. Since Bionic (18.04LTS) the full chezscheme is available as a repository.
First do
sudo apt update
then install the package:
sudo apt install chezscheme
This provides both the petite interpreter and the full scheme compiler.
There is also a PPA for trusty and xenial here:
https://launchpad.net/~jonathonf/+archive/ubuntu/lisp?field.series_filter=
Download the RPM package instead and use alien from terminal to produce a deb file:
fakeroot alien PetiteChezScheme-8.4-1.x86_64.rpm
You may need to install fakeroot, alien for this to work:
apt-get install fakeroot alien
Then you'll have a deb file. If you are on a desktop you can just double click the file and it will open Software Center and you can click install and it will fix your dependency problems.

Resources