I just installed graphite on my mac, but some fonts are huge - osx-yosemite

I just installed graphite on OSX, and managed to get the web app running this command:
python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite
I'll eventually move it to ubuntu, but in the mean time, some fonts are enormous:
Any thoughts on how to fix this?

I chased this down to an issue with the newest version of cairo. I removed cairo and installed 1.12.6. I posted the instructions here gist.github.com/relaxdiego/7539911

Its the cairocffi that handles the fonts and other display parameters. Sometimes installing only cairo doesn't work. In the above case you should always troubleshoot by ensuring proper and complete installation of the cairocffi package. By complete I mean all the dependencies for cairocffi.
The frequently required are:
1. libffi-devel (for rpm based operating systems)
sudo yum install libffi-devel
2. libffi-dev (for debian based operating systems)
sudo apt-get install libffi-dev
3. parse_lookup
sudo pip install parse_lookup
This is the Github page for cairocffi.

Related

Adding Qt Dependencies to spec file in rpmbuild

I'm using Ubuntu 14.04 and I am updating the rpmbuild spec file of an application that now uses Qt.
The packages that I need are the following:
sudo apt-get build-essential
sudo apt-get install mesa-common-dev -y
sudo apt-get install libglu1-mesa-dev -y
sudo apt-get qt5-default
sudo apt-get qtwebengine5-dev
I know the spec file has "BuildRequires" and "Requires" dependency tags...any help in writing this as well as some examples would be helpful. I have a working spec file I just need to add the dependencies.
I think there is some confusion here. spec files are used to generate rpm files. However Ubuntu uses deb files.
Supposing you really want to create an rpm; then you need to know this:
BuildRequires
these packages are required for building the rpm. Typically you will need build-essential and the '*-dev` packages for building your application
Requires
these packages are required upon installation for your application to work; mostly you don't need your build-tools anymore, but you still need the qt5-default for example.
PS: on a little side note I might be one of the only people in the world building deb packages using spec files with a special conversion script https://bitbucket.org/klaussfreire/spec2deb/src/default/ but I wouldn't really recommend that.

install rule of python based packages on Debian 9

In order to install matplotlib in Debian 9 should I issue
sudo apt-get install python3-matplotlib
or
pip3 install matplotlib?
What is the preferred way? Let me add more detail.
'man pip3' says
pip is a Python package installer, recommended for installing Python
packages which are not available in the Debian archive.
matplotlib confirms this
To install Matplotlib at the system-level, we recommend that you use
your distribution's package manager. This will guarantee that
Matplotlib's dependencies will be installed as well.
According to this I shall run apt-get. However, I had a similar case with numpy. 'import numpy' worked after 'pip3 install numpy'.
Using
Debian GNU/Linux 9.6 (stretch)
$ python3 -V
Python 3.5.3
The key quote from man pip3 is:
recommended for installing Python packages which are not available in the Debian archive.
You can check whether a package is available in the Debian archive by issuing an apt search command, eg.
apt search matplotlib
If your system already has all the necessary dependencies then installing a package with pip will work (as you experienced with pip install numpy).
If you do not have the necessary dependencies your distribution’s package manager will install them automatically. However, this is not true of pip: you would need to resolve any dependency issues manually. In the case of matplotlib, you can find a list of the dependencies you'd need to install manually here.
Essentially, using your system package manager to install a package takes away the extra work of ensuring you have all the necessary dependencies for that package.
pip comes into its own if you desire to work with virtual environments.

Can I use phantomJS on Azure app service for linux?

I'm getting a consistent error when trying to use the html-pdf package in my node application:
StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
As far as I can tell everything is installed correctly and the npm install works as expected. My suspicion is that there is some missing dependency in the built-in linux image, but I'm not sure how to confirm that.
According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.
Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.
So the native package fontconfig or libfontconfig must have been installed in docker image first.
For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.
For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.

Terminal command in fedora

What does the yum and -y means
yum install httpd -y
new to fedora. please guide me.
the above code will install Apache server in fedora
yum is a software package manager that installs, updates, and removes packages on RPM-based systems. It automatically computes dependencies and figures out what things should occur to install packages. yum makes it easier to maintain groups of machines without having to manually update each one using rpm.
-y means that we did't want to gave yes to install any package (here httpd)
httpd installs apache web server
Thanks for Support and advice

Install Older Version of Mono

Today my Ubuntu updated Mono to 4.2.1.102. It will not allow a certain program I absolutely need to run. How can I down-grade it to 4.0.5.1? I have tried...
sudo apt-get install mono-complete=4.0.5.1
That doesn't work.
Edit your /etc/apt/sources.list.d/mono-xamarin.list and change:
deb http://download.mono-project.com/repo/debian wheezy main
to:
deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.0.5.1 main
That will pin it to version 4.0.5.1.
FYI: Make sure that you do not have any alpha/beta repos for mono in any of your /etc/apt/sources/list.d/xxxxx.list files.
Basic Steps to Downgrade:
sudo apt-get remove mono-complete
# Edit your mono-xamarin.list and pin it to the version of your choice.
sudo apt-get update
sudo apt-get install mono-complete
Accessing older releases If for some reason you want to pin an older
version of Mono rather than updating to the latest, you can modify the
Debian repository to “wheezy/snapshots/X.XX.X” instead of “wheezy”.
For example, “wheezy/snapshots/3.10.0” will lock you to that version.
These snapshots will cease receiving updates as soon as the next major
Mono version gets uploaded - for example, as soon as Mono 3.12 gets
uploaded, 3.10 will never receive updates.
On RPM distributions, force the package version in your package
manager - all older versions are published in the YUM metadata and
should be available.
Ref: http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases
Ref: Versions available:
http://download.mono-project.com/repo/debian/pool/main/m/mono/
If, like me, you followed the official guide: https://www.mono-project.com/download/stable/ then you would have added an apt key and created
/etc/apt/sources.list.d/mono-official-stable.list
You can keep the key, but remove the file above using sudo rm -r /etc/apt/sources.list.d/mono-official-stable.list
Then make sure you follow the best answer above by editing the mono-xamarin.list file for the version you want and remove the version of mono you have.
Then apt update, then install mono-complete. An easy way to know you are correctly downloading and compiling a different version is that apt will prompt you asking if you want to download the files, and the size will be different.
Hope this helps someone, this last step made it work for me.
My system is Ubuntu 18.04.