2014-04-19 299 views
2

我一直在使用libicu来检测在docker,ubuntu中运行的节点应用程序中的字符集。这是通过使用libicu-dev包的模块node-icu-charset-detector完成的,该包在npm包之前安装。libicui18n.so.52:无法打开共享目标文件

这一切都工作得很好,但我suddently得到错误

module.js:356 
    Module._extensions[extension](this, filename);        ^
Error: libicui18n.so.52: cannot open shared object file: No such file or directory 
    at Module.load (module.js:356:32) 
    at Function.Module._load (module.js:312:12) 
    at Module.require (module.js:364:17) 
    at require (module.js:380:17) 
    at Object.<anonymous> (/app/node_modules/node-icu-charset-detector/node-icu-charset-detector.js:1:82) 

展望我的/ usr/lib目录/,我也没有发现任何相关的重症监护病房,但安装libicu-dev的。

这是我的码头文件;

# Pull base image. 
FROM dockerfile/ubuntu 

WORKDIR/
ADD run.sh /run.sh 

#make dirs 
RUN mkdir /log 
RUN mkdir /app 

RUN apt-get install -y supervisor libssl-dev pkg-config wget 


# Install Node.js 
RUN apt-get install -y software-properties-common 
RUN add-apt-repository -y ppa:chris-lea/node.js 
RUN apt-get update 
RUN apt-get install -y nodejs 




# Append to $PATH variable. 
RUN echo '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bash_profile 

ADD /supervisord.conf /etc/supervisor/conf.d/supervisord.conf 

#get phantomJS 
RUN apt-get install libfreetype6 libfontconfig -y 
RUN cd /app 
RUN npm install phantomjs &>/dev/null 

#ICU 
RUN apt-get install libicu-dev libicu48 -y 


RUN npm install --loglevel silent &>/dev/null 
RUN npm update --loglevel silent &>/dev/null 


#GET NODE-Supervisor 
RUN cd/
RUN npm install --loglevel silent -g supervisor 


RUN chmod 755 /*.sh 

CMD ["/run.sh"] 

感谢您对这个问题的任何帮助,因为我在我的Linux知识:(

回答

2

由于@mscdex指出,libicu一直在寻找libicu52包。不知怎的库得到更新允许我拉新libicu取决于libicu52是无效的能够在12.04的存储库中,但在14.04。由于Docker注册表中没有14.04的官方可信版本,因此我制作了自己的“基础”ubuntu14.04 docker镜像,该镜像从13.10开始并升级到14.04;

FROM ubuntu:saucy 

ENV DEBIAN_FRONTEND noninteractive 
# Work around initramfs-tools running on kernel 'upgrade': <http://bugs.debian.org/cgi- bin/bugreport.cgi?bug=594189> 
ENV INITRD No 

# Update OS. 
RUN sed -i 's/saucy/trusty/g' /etc/apt/sources.list 
RUN apt-get update -y 
RUN apt-get upgrade -y 
RUN apt-get dist-upgrade -y 

# Install basic packages. 
RUN apt-get install -y software-properties-common 
RUN apt-get install -y curl git htop unzip vim wget 

# Add files. 
ADD root/.bashrc /root/.bashrc 
ADD root/.gitconfig /root/.gitconfig 
ADD root/scripts /root/scripts 


RUN apt-get clean 

# Set working directory. 
ENV HOME /root 
WORKDIR /root 

CMD ["/bin/bash"] 

然后在我的工人的Dockerfile,我安装libicu52代替libicu48的因此,修正所有问题

4

您安装libicu 4.8结束,但请求的共享库libicu 52所以你要么需要从here安装libicu52包代替(如果有的话),或者下载预建的二进制(或源代码和编译)。

+0

你的答案似乎很基本的,我第一次,虽然你是我的曳。但你是对的。以某种方式libuci在引擎盖下更新,并希望libicu52仅在ubuntu 14.04中可用。感谢您的回答,我会在答案中写下整个过程 – japrescott

相关问题