简体   繁体   English

安装sql relay失败

[英]Installation of sql relay fails

I just created a docker container and tried to install SQL Relay inside it. 我刚刚创建了一个docker容器,并尝试在其中安装SQL Relay。

I've checked the prerequisites here and followed the installation documents here . 我检查了先决条件在这里 ,并按照安装文件在这里

However, at the end of make install of sqlrelay, I saw an error like this: 但是,在make install sqlrelay的最后,我看到了这样的错误:

update-rc.d: /etc/init.d/sqlrelay: file does not exist
update-rc.d: /etc/init.d/sqlrcachemanager: file does not exist
make[1]: *** [install] Error 1
make[1]: Leaving directory `/sqlrelay-0.66.0/init'
make: *** [install-init] Error 2

What might be wrong with my installation? 我的安装可能有什么问题?

Here's the docker file I used to start my installation: 这是我用来开始安装的docker文件:

FROM ubuntu:trusty

RUN apt-get update && \
    apt-get install libxml2-dev libpcre3 libpcre3-dev libmysqld-dev -y

RUN apt-get install mysql-server libmysqlclient-dev -y

# sql relay prerequisites 
RUN apt-get install g++ make perl php5-dev python-dev ruby-dev \
tcl-dev openjdk-7-jdk erlang-dev nodejs-dev node-gyp mono-devel \
libmariadbclient-dev libpq-dev firebird-dev libfbclient2 libsqlite3-dev \
unixodbc-dev freetds-dev mdbtools-dev -y

COPY rudiments-0.56.0.tar.gz /
COPY sqlrelay-0.66.0.tar.gz /

EXPOSE 80

Here are the outputs of ./configure , make , and make install inside sqlrelay-0.66.0 folder: 下面是输出./configuremake ,并且make install内部sqlrelay-0.66.0的文件夹:

configure_log configure_log

make_log make_log

make_install_log make_install_log

If you need more information of my installation process, just let me know. 如果您需要有关我的安装过程的更多信息,请告诉我。 I can provide it. 我可以提供。

I think you should use ADD instead of COPY in your lines such as 我认为你应该在你的行中使用ADD而不是COPY

COPY rudiments-0.56.0.tar.gz /

Your COPY just copies the .tar.gz, but does not unpack them 您的COPY只复制.tar.gz,但不解压缩

as with ADD 与ADD一样

If the <src> parameter of ADD is an archive in a recognised compression format, it will be unpacked

This is extracted from 这是从中提取的

What is the difference between the `COPY` and `ADD` commands in a Dockerfile? Dockerfile中的`COPY`和`ADD`命令有什么区别?

I have recently hit the same issue. 我最近遇到了同样的问题。 The issue I found was that the init Makefile was incorrectly detecting the use of systemctl on Ubuntu Trusty and putting the scripts there. 我发现的问题是init Makefile错误地检测到在Ubuntu Trusty上使用systemctl并将脚本放在那里。 Later on the script would try to find the scripts in init.d and fail. 稍后脚本会尝试在init.d中找到脚本并失败。

The solution is to edit the Makefile: sqlrelay-XXX/init/Makefile 解决方案是编辑Makefile: sqlrelay-XXX/init/Makefile

Replace: 更换:

install:
    if ( test -d "/lib/systemd/system" ); \

With: 附:

install:    
    if ( test -d "/lib/systemd/system_x" ); \

Make a similar change to the uninstall option later in the script and it will now correctly install on Ubuntu. 稍后在脚本中对uninstall选项进行类似的更改,现在它将在Ubuntu上正确安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM