jap*_*ott 2 ubuntu shared-libraries icu node.js docker
我一直在使用 libicu 来检测在 docker、ubuntu 内部运行的节点应用程序中的字符集。这是通过使用该包的模块node-icu-charset-detector 完成的,libicu-dev我在 npm 包之前安装了该包。
一切正常,但我突然收到错误
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)
Run Code Online (Sandbox Code Playgroud)
查看我的 /usr/lib/,我没有找到任何与 icu 相关的东西,但是安装了 libicu-dev。
这是我的 docker 文件;
# 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"]
Run Code Online (Sandbox Code Playgroud)
感谢您对这个问题的任何帮助,因为我的 linux 知识快要结束了:(