0

I am trying to cross-compile Nginx for Armv7l. See the followings steps already done (following this tutorial mainly Nginx for arm)

Step 1

./configure --without-pcre --without-http_rewrite_module --without-http_gzip_module

Step 2

make

Step 3

vi objs/Makefile

Replace CC = cc to CC = arm-linux-gcc

Step 4

find . -name "*.o" | xargs rm -f

Step 5

make

Step 6

My binary file "nginx" is available in objs/nginx. Command file gives the following result

objs/nginx: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.28, not stripped

Step 7

Copy this binary nginx inside /sbin on my arm machine and use the command sh /sbin/nginx

nginx: line 1: syntax error: word unexpected (expecting ")")

I cannot find any help on internet. What does that error mean ? Is my file corrupted ? Should I copy the whole objs folder or only the binary as I did ?

Is there an already compiled version of nginx for armv7l (I did not find one) ?

1 Answer 1

0

It is either:

sh -c /sbin/nginx

Or:

/sbin/nginx

And if you have Qemu correctly installed on your host, you can enjoy your ARM-version of Nginx (easier with a static one).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .