【发布时间】:2018-03-17 15:00:00
【问题描述】:
我正在尝试在 Ubuntu 中安装这个 http-parser,但在他们的 github 上找不到正确的方法:
https://github.com/nodejs/http-parser
你能指教一下吗?
【问题讨论】:
-
可以使用Makefile安装
标签: ubuntu command-line
我正在尝试在 Ubuntu 中安装这个 http-parser,但在他们的 github 上找不到正确的方法:
https://github.com/nodejs/http-parser
你能指教一下吗?
【问题讨论】:
标签: ubuntu command-line
这些说明应该适用于任何最近的 Ubuntu 环境 (YMMV):
# install git, gcc and make (among the others)
sudo apt install git build-essential
# go to your home and clone the latest version of the project there
cd && git clone https://github.com/nodejs/http-parser
# go inside the project directory, compile and install with superuser privileges
cd http-parser && make && sudo make install
由于我已经安装了很多软件包,因此可能会遗漏一些东西,请随时通知我任何编译问题。
【讨论】:
./configure 不需要(实际上它根本不存在)。下载 current latest release 作为替代安装 git 并继续。请注意,您无法避免安装 build-essential,除非它们已经存在于您的系统中。