diff --git a/deploy_mediaconch/Dockerfile b/deploy_mediaconch/Dockerfile
index 9279b565b80089c8963c16eac9681d3445a56e32..d2f65fffd552fa0be25f308ab4d611811a3999de 100644
--- a/deploy_mediaconch/Dockerfile
+++ b/deploy_mediaconch/Dockerfile
@@ -27,7 +27,8 @@ RUN yum install -y devtoolset-2-gcc-c++ devtoolset-2-libstdc++-devel devtoolset-
 RUN scl enable devtoolset-2 bash
 RUN yum install -v -y tree
 RUN yum install -v -y autoconf automake libtool pkgconfig
-RUN yum install -v -y libxml2-devel libxslt-devel zlib-devel libsqlite-devel
+RUN yum install -v -y zlib-devel libsqlite-devel
+RUN yum install -v -y python-devel
 
 ## add user environment
 RUN useradd builder -u 1000 -m -G users,wheel && \
@@ -49,6 +50,39 @@ WORKDIR /home/builder/
 ENV DISTDIR=/home/builder/distribution/usr/local
 RUN mkdir -p $DISTDIR
 
+# get and compile libxml2, because RHEL uses outdated and errorneous version
+RUN wget -np https://gitlab.gnome.org/GNOME/libxml2/-/archive/master/libxml2-master.tar.gz
+RUN tar xfz libxml2-master.tar.gz
+RUN cd libxml2-master && ./autogen.sh
+RUN cd libxml2-master &&\
+    ./configure --prefix=$DISTDIR --without-python &&\
+    make -j &&\
+    make install
+ENV PATH=$PATH:$DISTDIR/bin
+RUN echo $PATH
+
+
+
+# get and compile libxslt, because RHEL uses outdated and errorneous version
+RUN wget -np https://gitlab.gnome.org/GNOME/libxslt/-/archive/master/libxslt-master.tar.gz
+RUN tar xfz libxslt-master.tar.gz
+RUN cd libxslt-master && ./autogen.sh
+RUN cd libxslt-master && ./configure --help
+# patch errorneous configure
+RUN cd libxslt-master && sed -i -e "16135s/.*/echo nothing/" configure
+RUN cd libxslt-master && (cat -n configure | head -n 16143 | tail -n 10)
+RUN cd libxslt-master && \
+    ./configure --prefix=$DISTDIR --without-python --without-crypto \
+    --with-libxml-src=/home/builder/libxml2-master \
+    --with-libxml-prefix=$DISTDIR/bin \
+    --with-libxml-include-prefix=$DISTDIR/include \
+    --with-libxml-libs-prefix=$DISTDIR/lib &&\
+    make -j &&\
+    make install
+
+
+
+
 # get and compile libzen
 RUN git clone https://github.com/MediaArea/ZenLib.git
 # next lines only usefull if mediaconch build with cmake
@@ -92,7 +126,9 @@ RUN cd MediaInfoLib/Project/GNU/Library/ &&\
 
 #ENV PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$DISTDIR/lib64/pkgconfig:$DISTDIR/lib/pkgconfig
 #run echo $PKG_CONFIG_PATH
-
+RUN ln -s libxml2-master libxml2
+RUN ln -s libxslt-master libxslt
+RUN ls -lha
 # get and compile mediaconch
 RUN git clone https://github.com/MediaArea/MediaConch_SourceCode.git
     #cmake ../Project/CMake -DCMAKE_INSTALL_PREFIX=$DISTDIR &&\
@@ -104,7 +140,9 @@ RUN cd MediaConch_SourceCode &&\
 RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\
    ./configure --help
 RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\
-   ./configure --prefix=$DISTDIR --without-sqlite --without-jansson    --without-libevent
+fgrep --color -C 4 libxml2 configure
+RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\
+   CXXFLAGS="-O3 -I$DISTDIR/include -L$DISTDIR/lib -L$DISTDIR/lib64" ./configure --prefix=$DISTDIR --without-sqlite --without-jansson    --without-libevent
 
 RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\
     make -j &&\