Open yellow1912 opened 4 years ago
Version 0.97 of nchan does not exist (anymore) at the URL you try to download from.
Sorry, I meant to use v1.2.7, I think in my code it was correct. But just to be sure let me try again within today and report back.
I use Docker to build nchan, this might help you
Dockerfile:
FROM ubuntu:bionic AS builder
ENV NCHAN_VERSION 1.2.2
ENV NGINX_VERSION 1.18.0
RUN apt-get update && apt-get install -qq -y gnupg1 ca-certificates \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 \
&& echo "deb https://nginx.org/packages/ubuntu/ bionic nginx" >> /etc/apt/sources.list.d/nginx.list \
&& echo "deb-src https://nginx.org/packages/ubuntu/ bionic nginx" >> /etc/apt/sources.list.d/nginx.list \
&& apt-get update \
&& apt-get install -qq -y wget build-essential libpcre3 libpcre3-dev libssl-dev zlibc zlib1g zlib1g-dev nginx
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
wget "https://github.com/slact/nchan/archive/v${NCHAN_VERSION}.tar.gz" -O nchan.tar.gz
# Reuse same cli arguments as the nginx binary used to build
RUN CONFARGS=$(nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p') && \
mkdir /usr/src1 && \
tar -zxC /usr/src1 -f nginx.tar.gz && \
tar -xzvf "nchan.tar.gz" && \
NCHAN_DIR="$(pwd)/nchan-${NCHAN_VERSION}" && \
cd /usr/src1/nginx-$NGINX_VERSION && \
./configure --with-compat "$CONFARGS" --add-dynamic-module=$NCHAN_DIR && \
make modules && \
mv ./objs/*.so /
release.sh
#!/bin/bash
set -e
mkdir -p tmp/
docker build -f Dockerfile -t nchan_module:releaser .
DOCKER_UUID=$(cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
docker run -ti --name nchan_module_${DOCKER_UUID} nchan_module:releaser /bin/true
docker cp nchan_module_${DOCKER_UUID}:/ngx_nchan_module.so tmp/
docker rm nchan_module_${DOCKER_UUID}
DOCKER_UUID generation line
DOCKER_UUID=$(cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
might not work on Ubuntu (works for me on macOS), but I've copied it from the internets, so if you google it, you will find a proper variant for Debian/Ubuntu
HTH
Hello,
Please bear with me as I'm very new to this, so I will try to explain everything in details:
I tried to install the latest nginx from source (1.19.2) following this guide: https://devopscraft.com/how-to-compile-nginx-from-source-on-ubuntu-20-04/ (I use Ubuntu 20.04 LTS on my test server)
I tried to create the dynamic module for nchan following this guide: https://www.nginx.com/blog/compiling-dynamic-modules-nginx-plus/
My exact code for this step looks like this:
The output of the
make modules
looks like this;Is there anything I do wrong here? I really want to try out nchan and want to try to build everything from source to keep up with version changes.