I ran into the problem of rendering very large pdf files from html with phantomjs 2.1.1
The mentioned solution was to install fonts locally on ubuntu & then have phantomjs use these.
Does anybody have experience doing this?
You should install the libfreetype6, libfreetype6-dev, libfontconfig1 and libfontconfig1-dev packages:
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
You may also need to set the following value in your bash profile:
LC_ALL=en_US.UTF-8
Related
My program has the following dependencies in Ubuntu:
apt-get install unzip wget
apt-get install mesa-common-dev -y
apt-get install libglu1-mesa-dev -y
apt-get install libfontconfig1 -y
apt-get install libglib2.0-0 -y
apt-get install libxcursor-dev libxtst-dev libxi-dev libxrender-dev -y
apt-get install libxss-dev libxcomposite-dev libxslt1-dev -y
apt-get install libasound2-dev -y
Now I also need to deploy on RHEL which uses "yum" instead of "apt-get" so my question is what is the "yum" equivalent of all the packages used above. Is there a table where they are mapped? Basically for each package above I want to know or how to find out the "yum" repository equivalent.
Also, if I'm writing a SPEC file with BuildRequires...are they all yum package names because RPM is mainly for RedHat?
RHEL variants will use -devel convention instead of -dev from debian world. Beside that the names would be similar, a yum search PKG would point out the right direction
If things get hard you can use dpkg -L PKG, grab a key file and yum whatprovides FILE to find out what packages provides that file.
I am currently trying to setup my Windows 10 Dev Box with WSL. I have successfully install Ubuntu (Ubuntu 16.04.3) on a Windows 10 Insider Preview Version 1803 (OS Build 17666.1000). Using this walkthru to setup a RoR Dev ENV. Getting Rails app to...
sudo apt-get update seems to run fine.
sudo apt-get install git-core curl zlib1g-dev seems to run fine except libfreetype6 is no longer required.
When I try to run a build-essential command it gives me this message: build-essential: command not found
I try to apt-get autoremove to see if the libfreetype6 is causing the issue, no dice. I try sudo apt-get install --reinstall build-essential and it installs, but as soon as I run another build-essential command, it's not found again. Am I missing something?
Any help or direction would be awesome. Thanks.
You're missing nothing. build-essential is a package, not a command.
If you do apt show build-essential, you will notice this line:
Depends: libc6-dev | libc-dev, gcc (>= 4:7.2), g++ (>= 4:7.2), make, dpkg-dev (>= 1.17.11)
So it's just a convenient package that installs a set of essential build tools.
Furthermore, if you do dpkg -L build-essential, you will find that it contains nothing in /usr/bin (or whatever binary directory).
you have to install build-essential. first update repo list and update your libs, then install it.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
It works for me in WSL, thanks Roberto
I am running a phantomJS command which converts HTML to a PDF buffer on Docker containing Cent OS. The PDF renders fine, but the font/font format is rendering
The available fonts on the system are:
/usr/share/fonts/lyx/eufm10.ttf: eufm10:style=LyX
/usr/share/fonts/lyx/cmsy10.ttf: cmsy10:style=LyX
/usr/share/fonts/lyx/msam10.ttf: msam10:style=LyX
/usr/share/fonts/lyx/cmmi10.ttf: cmmi10:style=LyX
/usr/share/fonts/lyx/wasy10.ttf: wasy10:style=LyX
/usr/share/fonts/lyx/esint10.ttf: esint10:style=LyX
/usr/share/fonts/lyx/rsfs10.ttf: rsfs10:style=LyX
/usr/share/fonts/lyx/stmary10.ttf: stmary10:style=LyX
/usr/share/fonts/lyx/cmex10.ttf: cmex10:style=LyX
/usr/share/fonts/lyx/msbm10.ttf: msbm10:style=LyX
/usr/share/fonts/lyx/cmr10.ttf: cmr10:style=LyX
How do I fix this to use a readable font?
I can enforce an inline style font family but what would I set it to in order for it to be readable?
Perhaps I should be installing fonts in my Docker file.
Thanks!
Forgot to follow up on this but basically found some libs to fill this void and fix the font issue. Hope it will be useful if anyone runs into this issue.. In my Dockerfile, I run the following:
RUN yum install libXext -y
RUN yum install libXrender -y
RUN yum install xorg-x11-fonts-Type1 -y
RUN yum install xorg-x11-fonts-75dpi -y
RUN yum install xorg-x11-fonts-100dpi -y
How to install linux libraries in ipv6 machine, yum is not working for me in ipv6 setup.
e.g.
yum install pam.i686
is simply not working.
Is there any convenient way like yum which we can use in ipv6 as well.
For Ubuntu: sudo apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2
For SUSE: sudo zypper install xorg-x11-libICE xorg-x11-libSM xorg-x11-libXrender xorg-x11-libXext fontconfig cups-libs
For RedHat: sudo yum install libXrender libSM libICE libXext fontconfig cups-libs
for more info please check the link http://docs.alfresco.com/4.2/concepts/install-lolibfiles.html
How can I compile/install node.js on Ubuntu? It failed with an error about cxx compiler.
One-liner to install all needed dependencies(curl and git are not really needed, but are very useful and also needed if you install via nvm).
sudo apt-get install build-essential libssl-dev curl git-core
Last two dependencies are not always needed, but installing them is really usefull anyway and you probably need it later anyway.
To only install cxx compiler
sudo apt-get install build-essential
If openssl is missing
sudo apt-get install libssl-dev
If like me, you are attempting to install this on an AWS instance running Amazon Linux AMI (which looks to be a cut down version CentOS):
Install base tools:
yum groupinstall "Development Tools"
Now install openssl-devel:
yum install openssl-devel
Node should compile fine now.
If you're attempting this on Win7 like me, running:
ash.exe
$ /bin/rebaseall
...did the trick.
Good luck!
If you find yourself getting this error on Mac OSX, you need to install XCode.
https://developer.apple.com/
I needed to run yum install gcc-c++ on Cent OS.
There is a package for it on launchpad.
https://launchpad.net/~chris-lea/+archive/node.js/
For Node.js v6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
For Node.js v7:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
Optional: install build tools
To compile and install native addons from npm you may also need to install build tools:
sudo apt-get install -y build-essential
After to get latest NPM packages, if you need:
npn update -g
Partial source here.