I followed the steps of compiling the source code of GhostScript on Centos v6. It appears to be straight forward:
1) Download the PDL.tar.gz
wget http://downloads.ghostscript.com/public/ghostpdl-9.16.tar.gz
2) Extract tar.gz
tar xvfz ghostpdl-9.16.tar.gz
3) cd into the directory and configure
cd ghostpdl-9.16
./configure
4) Make runs for a 10 minutes or so, says done
make
5) Make install....
make install
The following is printed back to me in the console
install main/obj/pcl6 /usr/local/bin
However, I typically open GhostScript by typing gs, why does this not work anymore?
You've built the top level PDL (which includes PCL and XPS) but you haven't built Ghopstscript.
For historical reasons (whcih will eventually be done away with) Ghostscript is built separately. Go to ghostpdl-916/gs and repeat the steps from ./configure onwards.
Related
I am trying to install Matlab on Manjaro, but after I run the script "install", I got error: ...Downloads/matlab_R2020a_glnxa64/bin/glnxa64/libexpat.so.1: file too short
Does anyone know how can I fix it?
Use root as the ID for the Matlab. Otherwise, the key recognition may cause errors.
From the matlab aur package:
Maybe you'd create this archive like this:
1) download the matlab installer form themathworks, let's imagine that file is ~/Downloads/matlab_R2019b_glnxa64.zip
2) extract it: unzip ~/Downloads/matlab_R2019b_glnxa64.zip -d ~/matlab
3) run the installer almost completely through manually: ~/matlab/install -downloadFolder ${HOME}/matlab/dl -destinationFolder ${HOME}/matlab/deleteme
you must enter all your proper license info here, the purpose of this is to get the toolbox files you'll need for the offline install later when you see that the installer has finished downloading everything, press the Cancel button in the gui and end the installer early you don't really want the installer to extract/decrypt the files it has downloaded
4) delete anything that might have started to be installed in the above step: rm -rf ~/matlab/deleteme
5) now you can create the tarball you'll need here: tar -cvf matlab.tar -C ~/matlab/ .
You can get your file installation key (that you must manually put into matlab.fik) from https://mathworks.com/licensecenter
Then maybe you could make the matlab.fik file you need for this package like this:
echo "xxxxx-xxxxx-xxxxx-xxxxx-..." > matlab.fik
I tried doing the following. First, I install a relocatable perl, e.g.:
% perlbrew -Duserelocatableinc -j4 -n --as perl-5.28.1-fresh_src 5.28.1
Then, whenever I need a new throw-away fresh installation of perl to test things out, I do:
% cp -la ~/perl5/perlbrew/perls/perl-5.28.1-fresh{_src,1}
% perlbrew switch 5.28.1-fresh1
(then would later create fresh2, fresh3 and so on as needed; and when I want to throw these away I just rm -rf ~/perl5/perlbrew/perls/*fresh1 and so on.)
However, something (cpanm? EUMM?) is still confused. Scripts installed from CPAN still has the original perl path (in this case, /home/USER/perl5/perlbrew/perls/perl-5.28.1-fresh_src/bin) in their shebang line.
Any hint to the problem above, or an alternative way to quickly create a fresh throw-away perl installation is appreciated. Also, would the -l (--link) option of cp in the above command cause issue (other than perllocal.pod being appended and will contain installation records of perl installations, which is fine for me)?
It's not quite the same, but I find docker works if I'm needing a clean install for certain testing scenarios - build up a base image and a clean perl install, fire up the container and run 'whatever'.
You'll need root access and be able to install packages (e.g. docker) so it's not going to be suitable for every use case.
https://buildlogs.centos.org/centos/7/docker/ has a base image you can use to build a 'clean' CentOS (or use whatever OS you prefer frankly - most have container versions)
FROM scratch
ADD CentOS-7-20140625-x86_64-docker_01.img.tar.xz
LABEL name="CentOS Base Image"
CMD ["/bin/bash"]
In the working directory:
docker build -t mycentos .
This will give you a very basic image:
Then your perl dockerfile:
FROM mycentos
COPY local.repo /etc/yum.repos.d/local.repo
RUN yum clean all
RUN yum install --nogpgcheck -y make gcc tar
ADD perl-5.28.1.tar.gz /build/
RUN cd /build/perl-5.28.1 && ./Configure -de
RUN cd /build/perl-5.28.1 && make && make test && make install
COPY MyConfig.pm /root/.cpan/CPAN/MyConfig.pm
RUN cpan install Bundle::CPAN
CMD ["/bin/bash"]
You'll be able to spin this up, with e.g. docker run and invoke a script using /usr/local/bin/perl.
It's not quite what you asked for, but your base image can be started and discarded as you wish - you can maintain image for a few different OS and perl combinations too.
How can I download, compile, make & install ONLY the libpq source on a server (Ubuntu) that DOES NOT have PostgreSQL installed?
I have found the libpq source here. However it does NOT seem to be separable from the entire PostgreSQL. Thanks in advance.
I DO NOT want to install the entire PostgreSQL. I want to use libpq as a C interface to PostgreSQL on a DIFFERENT server (also Ubuntu) that DOES have it installed.
I also found this old link which indicates that the above is POSSIBLE but not HOW to do it.
I have found the libpq source here. However it does NOT seem to be separable from the entire PostgreSQL.
It has to be configured with the entire source tree because that's what generates the necessary Makefile parts. But once configured, make && make install can run inside the src/interfaces/libpq directory alone, and the rest being left out completely.
In steps:
download the source code archive, for example https://ftp.postgresql.org/pub/source/v9.4.1/postgresql-9.4.1.tar.bz2
unpack into a build directory: tar xjf ~/Downloads/postgresql-9.4.1.tar.bz2
apt-get install libssl-dev if it's not installed already
cd into it and configure: cd postgresql-9.4.1; ./configure --with-openssl --without-readline
Assuming configure succeeds, cd into src/interfaces/libpq and run make
still in the libpq directory, run make install as root: sudo make install.
That will install into /usr/local/pgsql and subdirectories as a library independent and insulated from the one packaged in Ubuntu if it happens to be installed. To install it elsewhere, specify the location with the --prefix option to configure.
Besides downloading and configuration, the steps are:
cd src/interfaces/libpq; make; make install; cd -
cd src/bin/pg_config; make install; cd -
cd src/backend; make generated-headers; cd -
cd src/include; make install; cd -
These steps will give you the library and headers of libpq, and a binary called pg_config, and all postgresql backend headers, so that you could compile things like libpqxx correctly.
(I've just tested with postgresql-9.6.5.)
I know about services like Online Font Converter, but I am interested in offline solution, preferably over command line. Does anyone know a tool or workflow how to convert WOFF to OTF/TTF offline?
I wrote a simple tool for that:
https://github.com/hanikesn/woff2otf
Currently only tested with ttf files.
Here is the reference code for making WOFF files: http://people.mozilla.org/~jkew/woff/ I have a mirror: https://github.com/samboy/WOFF
To compile and install, make sure you have the zlib development libraries installed (e.g. in CentOS6 yum -y install zlib-devel as root), then
git clone https://github.com/samboy/WOFF
cd WOFF
make
Then, as root:
cp sfnt2woff /usr/local/bin
Once this is done, to make a webfont, enter the directory with the .ttf file, then run sfnt2woff
sfnt2woff Chortle2014f.ttf
This creates a Chortle2014f.woff webfont file. Replace “Chortle2014f.ttf” with the name of the actual webfont to convert.
The first link I provide has Windows and MacOS binaries for people who do not wish to install a compiler.
Here is the reference code for making WOFF2 files: https://github.com/google/woff2 Note that this code will not install in CentOS6, but compiles and installs just fine in CentOS7:
git clone --recursive https://github.com/google/woff2.git
cd woff2
make clean all
woff2 font generation is similar:
woff2_compress Chortle2014f.ttf
I didn't like the fact that the current best answer is a Python script, and there also appear to be cases of people saying it doesn't work. In addition, none of the current answers seem to make mention of compiling WOFF converters with the zopfli compression algorithm, which is superior to the standard zlib algorithm that other tools use. For these reasons I decided to go the "proper" (i.e. non-script) route and add my own answer in the process.
Note: the compilation process for both of the below utilities is very easy, and made even easier by simply copying and running the snippets of code I've provided below, but they do still require a working compiler. If you haven't compiled software from source before, you may need to setup a compiler environment first. If you're using Cygwin, you can follow the first part of my answer here to set up the MinGW-w64 cross-compiler.
WOFF CLI converter (with ZOPFLI compression)
First, compile and install sfnt2woff1 by pasting all of the following into a terminal and pressing Enter:
git clone https://github.com/bramstein/sfnt2woff-zopfli.git woff &&
cd woff &&
make &&
chmod 755 woff2sfnt-zopfli sfnt2woff-zopfli &&
mv woff2sfnt-zopfli sfnt2woff-zopfli /usr/local/bin &&
rm -rf ../woff
Once the tool has been compiled and installed, convert a TTF or OTF file to WOFF by running:
sfnt2woff-zopfli <inputfile>.ttf
You can also use the -n option to increase the number of iterations the program is run in, increasing compression at the cost of conversion time (the default number of iterations is 15).
To convert all files in the current directory to WOFF:
for i in *; \
do sfnt2woff-zopfli.exe "$i"; \
done
WOFF2 CLI converter (with Brotli compression)
First, compile and install Google's woff2 tools by pasting all of the following into a terminal and pressing Enter:
git clone --recursive https://github.com/google/woff2.git &&
cd woff2 &&
make clean all &&
mv woff2_compress woff2_decompress woff2_info /usr/local/bin &&
rm -rf ../woff2
Once the tool has been compiled and installed, convert a single TTF or OTF file to WOFF2 by running:
woff2_compress.exe <inputfile>.ttf
To convert all files in the current directory to WOFF2:
for i in *; \
do woff2_compress.exe "$i"; \
done
You can even convert a WOFF2 file back to TTF or OTF:
woff2_decompress.exe <inputfile>.woff2
1 Note that SFNT here refers to the SFNT table format that both TTF and OTF font formats are built around.
Ive been looking for this too but, sorry i couldn't find an offline one but i found this:
http://orionevent.comxa.com/woff2otf.html - no longer available
its really good
EDIT: Found a command line tool
https://superuser.com/questions/192146/converting-from-woffweb-open-font-format
I used the python script linked above by
barethon to write an online javascript converter of WOFF to OTF
I realise this thread has been inactive for some time now, but with the help of a few stackoverflow users, I was able to use the above mentioned python script [woff2otf.py by #hanikesn] to create a workflow allowing batch conversion of woff files.
If not for the original poster's use, then for others who come across this thread in search of the same thing, check out my thread for details on how to do this:
Modify Python Script to Batch Convert all "WOFF" Files in Directory
Even if you don't need to batch convert, onlinefontconverter.com produces unreliable results, and everythingfonts.com has a 0.4 MB limit on conversions unless you upgrade to a paid account, and both are needlessly time consuming compared to offline solutions.
Good luck!
EverythingFonts has an online tool that appears to work well.
If you wish to do it offline, following Erik Tjernlund's answer on Super User, you can downloaded the source and compile executables of woff2sfnt and sfnt2woff.
The latest version as of this writing was from 2009/09/09. Unfortunately I've discovered that it doesn't appear to work for all WOFF files, sometimes complaining of a bad signature and sometimes simply giving a broken OTF file.
On a Mac with Homebrew it's simpler than the other mentioned approaches.
.woff2 to .ttf
brew install woff2
woff2_decompress somefont.woff2
This will leave you with somefont.ttf in the same directory.
.woff to .ttf
Converting WOFF (not woff2) is a little trickier, woff2_decompress probably won't handle it. You would first want to convert the .woff file to .woff2, then use the woff2_decompress command to turn that into .ttf file.
There's a brew tap that can be used to install sfnt2woff, which can be used to convert your .woff to .woff2.
brew tap bramstein/webfonttools;
brew install sfnt2woff;
sfnt2woff somefont.woff;
woff2_decompress somefont.woff2
I've recently made a Slax instalation with only the core program.
I used a copy of the live CD and ran a script to make hda1 bootable and then another script to use lilo to boot it... they were all in the CD... So it's like a big live cd on my HD and not really a full fledged OS.
Anyway I want to begin by compiling my own Emacs... Can someone help me?
thanks
The process shouldn't be too complicated. First, you need to download the source from http://ftp.gnu.org/pub/gnu/emacs/
Then, you untar the source with
tar xzf emacs-22.3.tar.gz
and cd into the newly created directory (emacs-22.3)
There, you run:
./configure
and then
make && make install
Read the INSTALL file for more information.
To compile emacs 22.3, first download http://ftp.gnu.org/pub/gnu/emacs/emacs-22.3.tar.gz . Extract the files to a directory, and then follow the instructions in the INSTALL file to install.
If you're asking about how to compile it on a read-only filesystem:
If you have lots of RAM, you can mount a ram disk.
If you have a harddisk, you can mount the extra space.
You can look at something like fuse for more ideas.