pdf2htmlEX error during conversion - CMap is not valid and got dropped for font - pdf2htmlex

I'm using this version https://github.com/pdf2htmlEX/pdf2htmlEX/releases/tag/v0.18.8.rc1
this debian version pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-focal-x86_64.deb
When I run the conversion I get a bunch of these errors:
Working: 97/100ToUnicode CMap is not valid and got dropped for font: b7
which result in empty files, without any text.
I'm running via docker, this is my dockerfile:
FROM ubuntu:20.04
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --configure -a
RUN apt-get clean
RUN apt-get update
RUN apt-get install -f -y python3
RUN apt-get install dialog apt-utils -y
RUN apt-get install -f -y python3-pip
RUN apt-get install -f -y python3-setuptools
RUN apt-get install -f -y wget
RUN apt-get install -f -y poppler-utils
RUN apt-get install -f -y poppler-data
RUN apt-get install -f -y jq
RUN apt-get install -f -y zip unzip
RUN apt-get install -f -y pdftk
RUN apt-get install -f -y ffmpeg
RUN apt-get install -f -y libfontforge-dev
RUN DEBIAN_FRONTEND=noninteractive; apt-get install -f -y pdftk-java
RUN apt install -f -y ghostscript
RUN pip3 install --upgrade pip \
&& apt-get clean
RUN pip3 --no-cache-dir install --upgrade awscli
WORKDIR /tmp
COPY lib/pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-focal-x86_64.deb /tmp
RUN apt install -y ./pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-focal-x86_64.deb
RUN wget https://www.imagemagick.org/download/ImageMagick.tar.gz && \
tar -xf ImageMagick.tar.gz && \
cd ImageMagick* && \
./configure && \
make && \
make install && \
ldconfig /usr/local/lib
Please advise how can I resolve this?

Related

unable to install singularity in Centos or Ubuntu

I need help on how to install singularity in Centos or Ubuntu successfully. I followed https://docs.sylabs.io/guides/3.0/user-guide/installation.html#install-on-linux but basically package "singularity" is unavailable. Any thoughts? Thanks!
Ubuntu:
sudo apt-get install -y singularity-container
E: Package 'singularity-container' has no installation candidate
Centos7:
sudo yum update -y && \
> sudo yum install -y epel-release && \
> sudo yum update -y && \
> sudo yum install -y singularity-runtime singularity
No package singularity-runtime available.
No package singularity available.

Raspberry Pi 4 OBS Virtual camera

I wrote this bash file, but not working. I think RPI just 32bit and the package what I found 64bit. Do you have any idea, how to find 32bit version of the package or how can I solve the problem?
I used this repos:
https://github.com/umlaeute/v4l2loopback
https://github.com/CatxFish/obs-v4l2sink
This code was the base
https://obsproject.com/forum/threads/obs-raspberry-pi-build-instructions.115739/
#!/bin/bash
#########################################################
# delete unnessery programs from pi
#########################################################
sudo apt-get -y remove --purge libreoffice*
sudo apt-get -y remove --purge scratch2 minecraft-pi wolfram-engine sonic-pi dillo squeak-vm squeak-plugins-scratch geany
sudo apt-get clean
sudo apt-get -y autoremove
sudo apt-get update
sudo apt-get dist-upgrade
#########################################################
#install obs with virtual camera
#########################################################
#make swap file
sudo dd if=/dev/zero of=/var/swap2 bs=1024 count=1000000
sudo chmod 600 /var/swap2
sudo mkswap /var/swap2
sudo swapon /var/swap2
sudo swapon
#install obs
sudo apt install qtbase5-dev
mkdir -p ~/install
cd ~/install
git clone --recursive https://github.com/obsproject/obs-studio.git
sudo apt-get --allow-releaseinfo-change update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
sudo apt-get -y install build-essential checkinstall cmake libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-xinput-dev libxcb-randr0 libxcb-randr0-dev libxcb-xfixes0 libxcb-xfixes0-dev libx264-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig
sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_0.1.4-2+b1_armhf.deb
sudo dpkg -i libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo dpkg -i libfdk-aac-dev_0.1.4-2+b1_armhf.deb
sudo git clone --recursive https://github.com/obsproject/obs-studio.git
cd obs-studio
sudo mkdir build && cd build
sudo cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make -j4
sudo make install
#install virtual cam
cd ~/install
sudo apt-get install -y v4l-utils v4l2loopback-utils
sudo wget http://raspbian.raspberrypi.org/raspbian/pool/main/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1_all.deb
sudo apt-get install -y ~/install/v4l2loopback-dkms_0.12.5-1_all.deb
#install virtual cam obs plugin
cd ~/install
sudo wget https://github.com/CatxFish/obs-v4l2sink/releases/download/0.1.0/obs-v4l2sink.deb
sudo apt-get install -y ~/install/obs-v4l2sink.deb
mkdir -p ~/.config/obs-studio/plugins/v4l2sink/bin/64bit/
#run OBS
MESA_GL_VERSION_OVERRIDE=3.3 obs #only need to run this command from now on

Centos7 :: Error unpacking rpm package httpd-2.4.6-40.el7.centos.1.x86_64

I have to build an Image Docker for the solution of my company.
This Image have to contains some dependencies and have to based on centos7. Among these dependencies, there is httpd.
So, I built an image of CentOS 7 with systemd with this Dockerfile according to these explainations : https://hub.docker.com/_/centos/
My centos7/Dockerfile
FROM centos:centos7
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; \
do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
RUN yum -y install deltarpm && yum clean all
RUN yum -y update && yum clean all
RUN yum -y install vim wget tar && yum clean all
VOLUME ["/sys/fs/cgroup"]
CMD ["/usr/sbin/init"]
And I push this image on my repository "agilium/centos7"
And I wrote an other Dockerfile for httpd according to the same explainations :
My httpd/Dockerfile
FROM agilium/centos7
RUN yum -y update && yum clean all
RUN yum -y install httpd; yum clean all; systemctl enable httpd.service
EXPOSE 80
CMD ["/usr/sbin/init"]
And I have this error when I built my image :
Error unpacking rpm package httpd-2.4.6-40.el7.centos.1.x86_64
I also tried to localinstall the rpm package, but with the same error, like this :
COPY ./install/* ./install/
RUN yum -y localinstall ./install/httpd-2.4.6-40.el7.centos.1.x86_64.rpm
I search for solutions and I find an issue on github (issue #461) but it seems there was no solution found and the problem has solved itself. =/
Thanks for help.
If you have this problem try from Centos 6, i tried to go on devicemapper instead of aufs and my Docker crashed and i wasn't able to restart it or whatever...
I did a Dockerfile which work actually, at least until you're into the container:
FROM centos:6
RUN yum -y update \
&& yum install -y vim \
&& yum install -y httpd \
&& yum install -y mysql \
&& yum install -y php
EXPOSE 80 443 3306
CMD service httpd start \
&& clear \
&& bash

Issue with Shibboleth SP Compilation and Installation on Ubuntu 14.04

I followed the steps below to install Shibboleth SP on Ubuntu 14.04
Installed the pre-requisite packages
sudo apt-get install --yes wget gcc g++ make libssl-dev libcurl4-openssl-dev apache2-threaded-dev
Created directories
mkdir -p ~/build-shib
sudo mkdir -p /opt/shibboleth-sp/etc/shibboleth
Downloaded and installed the following
cd ~/build-shib
wget http://www.shibboleth.net/downloads/log4shib/1.0.4/log4shib-1.0.4.tar.gz
wget http://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.1.tar.gz
wget http://www.apache.org/dist/santuario/c-library/xml-security-c-1.6.1.tar.gz
wget http://www.shibboleth.net/downloads/c++-opensaml/2.4.3/xmltooling-1.4.2.tar.gz
wget http://www.shibboleth.net/downloads/c++-opensaml/2.4.3/opensaml-2.4.3.tar.gz
wget http://www.shibboleth.net/downloads/service-provider/2.4.3/shibboleth-sp-2.4.3.tar.gz
tar xvfz log4shib-1.0.4.tar.gz
tar xvfz xerces-c-3.1.1.tar.gz
tar xvfz xml-security-c-1.7.2.tar.gz
tar xvfz xmltooling-1.4.2.tar.gz
tar xvfz opensaml-2.4.3.tar.gz
tar xvfz shibboleth-sp-2.5.3.tar.gz
cd ~/build-shib/log4shib-1.0.4
./configure --disable-static --disable-doxygen --prefix=/opt/shibboleth-sp && make && sudo make install
cd ~/build-shib/xerces-c-3.1.1
./configure --prefix=/opt/shibboleth-sp && make && sudo make install
cd ~/build-shib/xml-security-c-1.7.2
./configure --without-xalan --disable-static --with-xerces=/opt/shibboleth-sp --prefix=/opt/shibboleth-sp && make && sudo make install
cd ~/build-shib/xmltooling-1.4.2
./configure --with-log4shib=/opt/shibboleth-sp --prefix=/opt/shibboleth-sp -C && make && sudo make install
cd ~/build-shib/opensaml-2.4.3
./configure --prefix=/opt/shibboleth-sp --with-log4shib=/opt/shibboleth-sp -C && make && sudo make install
cd ~/build-shib/shibboleth-2.5.3
./configure --with-saml=/opt/shibboleth-sp --enable-apache-22 --with-log4shib=/opt/shibboleth-sp --with-xmltooling=/opt/shibboleth-sp \
--prefix=/opt/shibboleth-sp -C && make && sudo make install
When I try to check if Shibboleth SP is compiled properly with
ldd /opt/shibboleth-sp/bbin/shibd | grep /opt/shibboleth-sp/lib
I get the following error
ldd: /opt/shibboleth-sp/bin/shibd: No such file or directory
On checking the contents in /opt/shibboleth-sp/bin/, I see that there is no shibd
What am I missing?
In my case the shibd was available at /opt/shibboleth-sp/sbin/ after source compilation. I have a 64-bit CPU architecture with Ubuntu 14.04. I am not sure if that affects.

rabbitmq settings do not persist while running dockerfile

I have any application for which I want to:
run rabbitmq-server
setup some queues and exchanges (I have a setuprabbit.py script for it)
and then run some scripts (that is done in supervisor)... But before that I have to set up rabbit
My Dockerfile looks like this:
RUN cd /var && wget -q http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.2/rabbitmq-server-generic-unix-2.8.2.tar.gz
RUN cd /var && tar -xzvf rabbitmq-server-generic-unix-2.8.2.tar.gz && rm rabbitmq-server-generic-unix-2.8.2.tar.gz
ENV PATH /var/rabbitmq_server-2.8.2/sbin/:$PATH
RUN rabbitmq-plugins enable rabbitmq_management && rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
#RUN rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
When I do a build it fails here (sudo docker build .)... It passes but I can see that by the time supervisor runs the scripts... rabbitmq is not longer running (rabbit node is down).
How do I persist rabbit setup e.t.c?
Here is my full Dockerfile:
FROM ubuntu:precise
MAINTAINER njain
#VOLUME ["home/njain/office/buzz"]
ADD . /tmp/
# DOCKER-VERSION 0.3.4
# Docker basics
RUN apt-get -y update
# EDITORS
#RUN apt-get install -y -q vim
## PYTHON
RUN apt-get install -y -q python-software-properties
RUN apt-get install -y -q python
RUN apt-get install -y -q python-setuptools
RUN apt-get install -y -q python-virtualenv
RUN apt-get install -y -q python-dev
RUN apt-get install -y -q python-distribute
#RUN apt-get install -y -q build-essential
RUN apt-get install -y -q python-pip
RUN pip --no-input install --upgrade pip
# LIBS
RUN apt-get install -y -q libjpeg8-dev
RUN apt-get install -y -q zlib1g-dev
RUN apt-get install -y -q libfreetype6-dev
RUN apt-get install -y -q liblcms1-dev
RUN apt-get install -y -q libwebp-dev
RUN apt-get install -y -q libtiff-dev
RUN apt-get install -y -q libffi-dev
# TOOLS
RUN apt-get install -y -q curl
RUN apt-get install -y -q git
RUN apt-get install -y -q vim
#RABBIT
RUN apt-get install -y -q rabbitmq-server
#RUN /usr/sbin/rabbitmq-plugins enable rabbitmq_management
# Install supervisor
RUN apt-get install -y supervisor
RUN mkdir -p /var/run/sshd
RUN mkdir -p /var/log/supervisor
RUN mkdir -p /etc/supervisor/conf.d
RUN mkdir -p /var/run/sshd /var/log/supervisor
COPY supervisord.conf /etc/supervisor/supervisord.conf
RUN pip --no-input install virtualenv
#RUN cd /tmp/
RUN cd /tmp/ && virtualenv buzzenv && python setup.py install
#RUN rabbitmq-server start &
#RUN python /tmp/buzz/scripts/setuprabbit.py
# Install RabbitMQ.
RUN apt-get update
RUN apt-get -f install
RUN apt-get install wget
#RUN \
#wget -qO - http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - && \
#echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list && \
#apt-get update && \
#DEBIAN_FRONTEND=noninteractive apt-get install -y rabbitmq-server && \
#rm -rf /var/lib/apt/lists/* && \
#rabbitmq-plugins enable rabbitmq_management && \
#echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config
# Define RabbitMQ variables.
#RUN mkdir -p /data/mnesia
#RUN chown -R rabbitmq:rabbitmq /data
#ENV RABBITMQ_LOG_BASE /var/log/rabbitmq
#ENV RABBITMQ_MNESIA_BASE /data/mnesia
#EXPOSE 5672
#EXPOSE 15672
#RUN echo "NODENAME=rabbit#localhost" > /var/rabbitmq-env.conf
RUN cd /var && wget -q http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.2/rabbitmq-server-generic-unix-2.8.2.tar.gz
RUN cd /var && tar -xzvf rabbitmq-server-generic-unix-2.8.2.tar.gz && rm rabbitmq-server-generic-unix-2.8.2.tar.gz
ENV PATH /var/rabbitmq_server-2.8.2/sbin/:$PATH
RUN rabbitmq-plugins enable rabbitmq_management && rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
#RUN rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
Because of the way docker works... After I run
RUN rabbitmq-plugins enable rabbitmq_management && \
rabbitmq-server -detached && \
sleep 5 && \
cd /tmp/ && \
rabbitmqctl start_app && \
python buzz/scripts/setuprabbit.py
it stops the rabbit server.
To make sure the states are preserved, I needed to
RUN rabbitmq-plugins enable rabbitmq_management && \
rabbitmq-server -detached && \
sleep 5 && \
cd /tmp/ && \
rabbitmqctl start_app && \
python buzz/scripts/setuprabbit.py && \
rabbitmqctl stop_app
and then start rabbitmq-server again in the next step.