netinet/sctp.h: No such file or directory - linux

I'm unable to include in any of my files. It always fails during compilation.
I got the lksctp-tools package installed.
I run
gcc -Wall -lsctp -o client admin.c deserializer.c input_parser.c main.c receive_response.c send_request.c serializer.c utils.c
And I get:
main.c:2:10: fatal error: netinet/sctp.h: No such file or directory
#include <netinet/sctp.h>
^~~~~~~~~~~~~~~~
compilation terminated.
I'm using Fedora, I don't know if that changes anything.
However the project seems to work fine on CLion.

On ubuntu need to install libsctp-dev.
sudo apt install libsctp-dev

ok turns out I had to do the following:
yum install lksctp-tools-dev

For Amazon Linux 2:
yum -y install lksctp-tools-devel

Related

I want to install G++ on my Linux Mint but not able to do so

I want to install g++ for using GROMACS on Linux mint. I typed the following command:
sudo apt-get install g++
It successfully installs the g++ but when I change the directory to Downloads to configure and make cmake and fftw, it (Downloads) is empty.
I have tried removing sudo apt-get remove g++ and re-installing g++ but it shows the same result. I don't know where it is downloading g++.
The command apt-get install g++ doesn't download any executables into your current directory or in the ~/Downloads/ directory.
Usually, it is installed in /usr/bin.
You can check for g++ with the command g++ --version.
Also, you can see where it is installed with whereis g++.
The build-essential package is a reference for all the packages needed
to compile a Debian package. It generally includes the GCC/g++
compilers and libraries and some other utilities
https://superuser.com/a/151558
For this purpose install them with command sudo apt install build-essential
and it will install all the things

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.

arm-linux-gnueabi-g++: command not found

I am trying to compile C++ code for ARM architecture. I don't know exactly the full name of processor (waiting for information from some hardware guy), I know only it is some ARM.
The problem which I have.
I use command in order to compile my resource files for ARM architecture:
arm-linux-gnueabi-g++ myApp.cpp -g -Wall -o myApp
and also
arm-linux-gnueabi-gcc myApp.cpp -g -Wall -lstdc++ -o myApp
and gets output:
-bash: arm-linux-gnueabi-g++: command not found
and
-bash: arm-linux-gnueabi-gcc: command not found
In linux which I used I am not sure if there is installed gcc,g++ arm package...
There is:
locate arm-none-linux-gnueabi-
locate arm-linux-gnueabihf-g++
locate arm-linux-gnueabihf-gcc
, there is none:
locate arm-linux-gnueabi-g++
locate arm-linux-gnueabi-gcc
I am not allowed to do some tries and install arm package, because this linux is running on some server to which many developers are attached.
setting PATH in shell:
PATH=$PATH:/opt/eds/x86_64/13.1-2/embedded/ds-5/bin/arm-linux-gnueabihf-g++
or with gcc
doesn't solve the issue.
Setting it in:
~/.bashrc
also doesn't solve the issue because additional problems occurs, I cannot connect to linux server.
Thanks in advance for any help.
for kernel or uboot cross compiling below commands are enough:
sudo apt-get install -y gcc-arm-linux-gnueabihf
sudo apt-get install -y libncurses-dev
sudo apt-get install -y libqt4-dev pkg-config
sudo apt-get install -y u-boot-tools
sudo apt-get install -y device-tree-compiler
but for c++ cross compiling you should install g++ using below command:
sudo apt-get install g++-arm-linux-gnueabihf

How to install `build-essential` in `Cygwin`?

How to install build-essential in Cygwin?
I've tried using: apt-cyg install build-essential
But does not work.
Installing build-essential
Package build-essential not found or ambiguous name, exiting
I'm also having problems like:
(gedit: 13864): Gtk-WARNING **: can not open display:
So I can not install crunch.
See It:
$ make all
Building binary...
/usr/bin/gcc -pthread -Wall -pedantic -std=c99 undefined crunch.c -lm -o crunch
gcc: error: undefined: No such file or directory
Makefile:48: recipe for target 'crunch' failed
make: *** [crunch] Error 1
What's the problem here, and how can I fix it?
There isn't a build-essential package in Cygwin.
Build-essential is a collection of packages. So you'll have to select the packages manually, which I believe are the following:
make
automake
gcc
gcc-c++
Assuming you're doing development, you'll want to select those packages from the Devel branch. This is done when you first install Cygwin and the installer asks you to select the packages, after choosing the download site from the list.
As for the Gtk-WARNING **: can not open display: error, this is because your system is not running Cygwin's X11 display server, which provides a surface for graphical applications to render to. Check out http://x.cygwin.com/.
If you want to run gedit in Windows, you should get the binary for windows here. That's built for Windows and doesn't need Cygwin.
EDIT: Running sudo apt-get install build-essential on Elementary OS Freya mentions the following dependencies will be installed as well, so you'll probably want that for a 'closer-to-Linux' build environment as well.
The following extra packages will be installed:
g++
g++-4.8
libstdc++-4.8-dev
Suggested packages:
g++-multilib
g++-4.8-multilib
gcc-4.8-doc
libstdc++6-4.8-dbg
libstdc++-4.8-doc
The following NEW packages will be installed:
build-essential
g++
g++-4.8
libstdc++-4.8-dev
The list of files installed can be found here
and the contents of the file list (current as of 4/24/2014) can be found in this PasteBin I made.
build-essential is an abstract package, short for its dependencies:
dpkg-dev
binutils
bzip2
libdpkg-perl
make
patch
perl
tar
xz-utils
g++
gcc
libc6-dev
make
So in Cygwin, it is the same to install their substitutes:
apt-cyg install make gcc-core gcc-g++ patch bzip2 perl tar xz
make and gcc-g++ (g++), which depends on gcc-core (gcc), are the most important.
If you really want to compile various projects in Cygwin, packages below may be also helpful. Be careful, libboost-devel is very large.
apt-cyg install git automake cmake python3-devel libboost-devel

error installing gd librarry for mapserver

I am installing all external and required libraries before compiling and installing source code of mapserver-6.4.1
I have installed all libraries successfully except libgd.
I have downloaded libgd from here
I am following the below procedure to compile gd library. But i am getting error on this.
[root#localhost /]# cd /usr/local/src/libgd-master
[root#localhost libgd-master]# ./configure
[root#localhost libgd-master]# -bash: ./configure: No such file or directory
Before executing ./configure
run
automake
After which the file configure will be generated.
Why don't you install the system rpm for libgd?
http://rpm.pbone.net/index.php3/stat/4/idpl/15161687/dir/redhat_el_6/com/libgd2-2.0.33-2_11.el6.x86_64.rpm.html
Or you may want the el7 package.
You can install automake as part of the autotools package.

Resources