X11/Xlib.h not found in Ubuntu - linux

I'm trying to write a rather trivial program using open gl on linux, but at a compile time it says:
Compile thumb : egl <= cuberenderer.c
In file included from
/path/include/egl.h:36,
from /path/cuberenderer.c:7:
/path/include/eglplatform.h:89:22:
error: X11/Xlib.h: No such file or
directory
/path/include/eglplatform.h:90:23:
error: X11/Xutil.h: No such file or
directory
I'm totally new to GL and have no idea what's wrong.

A quick search using...
apt search Xlib.h
Turns up the package libx11-dev but you shouldn't need this for pure OpenGL programming. What tutorial are you using?
You can add Xlib.h to your system by running the following...
sudo apt install libx11-dev

Presume he's using the tutorial from http://www.arcsynthesis.org/gltut/ along with premake4.3 :-)
sudo apt-get install libx11-dev ................. for X11/Xlib.h
sudo apt-get install mesa-common-dev........ for GL/glx.h
sudo apt-get install libglu1-mesa-dev ..... for GL/glu.h
sudo apt-get install libxrandr-dev ........... for X11/extensions/Xrandr.h
sudo apt-get install libxi-dev ................... for X11/extensions/XInput.h
After which I could build glsdk_0.4.4 and examples without further issue.

Why not try find /usr/include/X11 -name Xlib.h
If there is a hit, you have Xlib.h
If not install it using sudo apt-get install libx11-dev
and you are good to go :)

Related

python-rocksdb installation -llz4 missing inside /usr/bin/ld

With the installation of python-rocksdb on ubuntu i had the following issue of missing packages:
Then i run:
apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev
allmost all sorted, the only one that i can't find is -llz4. Anyone know what is the pacakge that i need to install?
At the moment whenever i run
pip install python-rocksdb
i always received the error
Sorted!
sudo apt-get install liblz4-dev

Build-Essential: Command Not Found on WSL

I am currently trying to setup my Windows 10 Dev Box with WSL. I have successfully install Ubuntu (Ubuntu 16.04.3) on a Windows 10 Insider Preview Version 1803 (OS Build 17666.1000). Using this walkthru to setup a RoR Dev ENV. Getting Rails app to...
sudo apt-get update seems to run fine.
sudo apt-get install git-core curl zlib1g-dev seems to run fine except libfreetype6 is no longer required.
When I try to run a build-essential command it gives me this message: build-essential: command not found
I try to apt-get autoremove to see if the libfreetype6 is causing the issue, no dice. I try sudo apt-get install --reinstall build-essential and it installs, but as soon as I run another build-essential command, it's not found again. Am I missing something?
Any help or direction would be awesome. Thanks.
You're missing nothing. build-essential is a package, not a command.
If you do apt show build-essential, you will notice this line:
Depends: libc6-dev | libc-dev, gcc (>= 4:7.2), g++ (>= 4:7.2), make, dpkg-dev (>= 1.17.11)
So it's just a convenient package that installs a set of essential build tools.
Furthermore, if you do dpkg -L build-essential, you will find that it contains nothing in /usr/bin (or whatever binary directory).
you have to install build-essential. first update repo list and update your libs, then install it.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
It works for me in WSL, thanks Roberto

Install GCC5 in Linux Mint LMDE 2

I'm new in Linux and I would like to unistall gcc 4.9 which is installed in my distro Linux Mint LMDE 2 and install gcc 5. I tried to used the following command:
sudo apt-get install gcc5
but it didn't worked. Can someone please help me with this? Please provide all steps to follow. Thank you in advance
Try this.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
apt-get autoremove
This should work in Linux Mint if I'm not mistaken, as its still using the same respository.
sudo apt-get respository ppa:ubntu-toolchain-r/test
This will install you the correct respositories you need for the computer. Some packages are not automatically known to the computer so you need to install the respositories so the computer can install it.
sudo apt-get update
This will update your computer and all packages and the respoitory, this wil ensure it will now work
sudo apt-get install gcc-5 g++-5
This will install the gcc-5 version you wanted.
sudo apt-get autoremove
When you install certain stuff, some things are no longer needed. Maybe a required package from a previous version that you no longer need, do this to conserve space.

How to install Go

I want to install Go. I prepared system for support language. But sadly, I can't find Bison and libc6-dev following this command.
sudo apt-get install bison ed gawk gcc libc6-dev make
Then I still can't find the suitable Mercurial for Ubuntu 8.10, which is followed this command.
apt-get install python-setuptools python-dev build-essential
Therefore everyone please guide what I should do in order to install Go completely. My OS is Ubuntu version 8.10. Notice you can post the direct link for me to get packets/files.
Mercurial can typically be installed with
sudo apt-get install mercurial
The package is in universe, which you may not have enabled. The full guide, if you need it, is available here:
https://help.ubuntu.com/community/Mercurial
After installing setuptools et al., the go installation instructions say that you should install mercurial with easy-install, i.e. sudo easy_install mercurial. Are you having trouble with easy_install?
In order to install go with Homebrew run the following command on the terminal:
$ brew install golang
To check the version of go run the following command:
$ go version
To see the location run:
$ which go
To uninstall go :
$ sudo apt-get remove golang-go

How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).

How can I compile/install node.js on Ubuntu? It failed with an error about cxx compiler.
One-liner to install all needed dependencies(curl and git are not really needed, but are very useful and also needed if you install via nvm).
sudo apt-get install build-essential libssl-dev curl git-core
Last two dependencies are not always needed, but installing them is really usefull anyway and you probably need it later anyway.
To only install cxx compiler
sudo apt-get install build-essential
If openssl is missing
sudo apt-get install libssl-dev
If like me, you are attempting to install this on an AWS instance running Amazon Linux AMI (which looks to be a cut down version CentOS):
Install base tools:
yum groupinstall "Development Tools"
Now install openssl-devel:
yum install openssl-devel
Node should compile fine now.
If you're attempting this on Win7 like me, running:
ash.exe
$ /bin/rebaseall
...did the trick.
Good luck!
If you find yourself getting this error on Mac OSX, you need to install XCode.
https://developer.apple.com/
I needed to run yum install gcc-c++ on Cent OS.
There is a package for it on launchpad.
https://launchpad.net/~chris-lea/+archive/node.js/
For Node.js v6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
For Node.js v7:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
Optional: install build tools
To compile and install native addons from npm you may also need to install build tools:
sudo apt-get install -y build-essential
After to get latest NPM packages, if you need:
npn update -g
Partial source here.

Resources