1

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.

Flama
  • 772
  • 3
  • 13
  • 39

3 Answers3

12

On ubuntu need to install libsctp-dev.

sudo apt install libsctp-dev
rashok
  • 12,790
  • 16
  • 88
  • 100
3

ok turns out I had to do the following:

yum install lksctp-tools-dev
Flama
  • 772
  • 3
  • 13
  • 39
0

For Amazon Linux 2:

yum -y install lksctp-tools-devel
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 04 '22 at 04:44