开发者

how to build node.js on Debian

I'm trying to build node.js in a debootstrap environment (which can be thought as a very basic Debian installation).

When I call:

make -f Makefile.cmake

It results in the following error:

Linking CXX executable default/node
CMakeFiles/node.dir/src/node_stdio.cc.o: In function `OpenPTY':
/home/node-v0.4.11/src/node_stdio.cc:261: undefined reference to `openpty'
collect2: ld returned 1 exit status
make[3]: *** [default/node] Error 1
make[3]: Leaving dir开发者_运维知识库ectory `/home/node-v0.4.11/build'
make[2]: *** [CMakeFiles/node.dir/all] Error 2
make[2]: Leaving directory `/home/node-v0.4.11/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/node-v0.4.11/build'
make: *** [package] Error 2

I couldn't find a Debian package for openpty. How can I make it build?


Edit: @free_easy indicated that he already had libc6-dev installed.

You could try to force an update of the dynamic linker run-time bindings sudo ldconfig, which may help with it being located.

Failing that, you could manually specify the path by exporting LDFLAGS before running make.

openpty is a function declared in pty.h which is a header file included with glibc. See http://www.gnu.org/software/gnulib/manual/html_node/pty_002eh.html#pty_002eh for further documentation.

Querying the debian package database for pty.h:

dpkg -S pty.h

I get

libc6-dev: /usr/include/pty.h

on an Ubuntu 11.04 desktop machine which suggests that you may need to have the libc6-dev package installed to compile node successfully.


I finally tried

configure
make
make install

which worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜