Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6789641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:37:43+00:00 2026-05-26T17:37:43+00:00

I figured it wouldn’t work, but i just uploaded my program file from local

  • 0

I figured it wouldn’t work, but i just uploaded my program file from local machine to a new instance on Amazon EC2. Than tried to run it:

[ec2-user@domU-12-31-39-14-2A-1A ~]$ ./webserver.net
-bash: ./webserver.net: /lib/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

Apparently there is no /lib/ld-linux-x86-64.so.2. It is a 64 bit Instance.

How would i compile/link on local machine targeting the EC2 instance. I don’t want to build it on the instance.

My Makefile

OBJECTS= ./obj/hello.o
LDFLAGS = -L/usr/lib -lwt -lwthttp

./bin/webserver.net : $(OBJECTS)
    g++ -o ./bin/webserver.net $(OBJECTS) $(LDFLAGS)

./obj/hello.o : ./src/hello.cpp 
    g++ -c ./src/hello.cpp -o ./obj/hello.o 

.PHONY: clean

clean:
    -rm -f obj/*.o bin/webserver.net core *~ src/*~ 

Update Statically linked file. There were undefined references until I added each library manually and in the right order. Is this necessary? or am I doing it wrong?

g++ -static -pthread -o ./bin/out.net ./obj/hello.o -lwthttp -lwt  -lboost_thread -lboost_system -lboost_program_options -lboost_random -lboost_signals -lboost_filesystem -lboost_regex -lboost_serialization -lboost_date_time -lssl -lcrypto -lz -ldl 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:37:44+00:00Added an answer on May 26, 2026 at 5:37 pm

    An ugly but simple solution might be to link statically your program.

    A more elaborate solution could be to mimic the environment of the EC2 instance in e.g. a chroot-ed environment on your local machine.

    In between you might copy the EC2’s /usr/include and /usr/lib/libc.so… etc.. locally, but that is risky.

    Perhaps also you could compile locally, and link on the EC2… (but that might not work)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I figured this would be simple, but being new to SSRS I'm not sure.
I figured this wouldn't be too difficult to do, but I can't seem to
I just got a new android phone, and I figured I'd play around with
I am new to OLAP, and figured out how to make a cube and
Perhaps this is impossible, but I figured I would ask anyway. I'm working on
Before I do this I figured I would ask if it was the best
The people on this website seem to know everything so I figured I would
Since debate without meaningful terms is meaningless , I figured I would point at
I'm not sure if this even exists or not, so I figured I would
What is returned if $('#id') doesn't match anything? I figured it would be null

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.