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