Compile .tex file with latexmk with www-data user (opencpu) - ubuntu-14.04

i run opencpu 1.5 [1] on ubuntu 14.04 server. My R-Package create an .tex file an trigger a system call to compile the pdf file with latexmk.
system("latexmk -xelatex -interaction=batchmode mylatex.tex")
On ubuntu 12.04 LTS it works fine.
This not working after updating from ubtuntu 12.04 LTS to 14.04 LTS.
The process is running as www-data user. With other system-users i can compile the .tex files with latexmk.
My LaTeX Version: TexLive 2016 full
Here the out from:
print(Sys.getenv())
...
APACHE_RUN_GROUP www-data
APACHE_RUN_USER www-data
HOME /tmp/ocpu-temp
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/texlive/current
...
Any ideas?
Thx!
--
[1] https://www.opencpu.org/

I found this entry in my log file:
apparmor="DENIED" operation="exec" profile="opencpu-exec"
name="/usr/local/texlive/2016/texmf-dist/scripts/latexmk/latexmk.pl" pid=4305 comm="sh" requested_mask="x" denied_mask="x" fsuid=33 ouid=0
Then I added the following line:
/usr/local/texlive/2016/texmf-dist/scripts/latexmk/latexmk.pl ux,
in this /etc/apparmor.d/opencpu.d/custom file.
This has solved my latexmk issue.
Thx to Jeroen

Related

Miniconda installation error on Linux and aarch64

I’m trying to install Miniconda on a debian linux, running on Arm Cortex A-53.
I’ve downloaded Miniconda3-latest-Linux-aarch64.sh, and now trying to install using
bash Miniconda3-latest-Linux-aarch64.sh
Getting the following error:
[/home/analog/miniconda3] >>>
PREFIX=/home/analog/miniconda3
Unpacking payload …
Miniconda3-latest-Linux-aarch64.sh: line 406: /home/analog/miniconda3/conda.exe: No such file or directory
Miniconda3-latest-Linux-aarch64.sh: line 409: /home/analog/miniconda3/preconda.tar.bz2: No such file or directory
Any ideas?
It’s strange that there is a conda.exe involved on a linux…
Additional Info
Tried running as root - same behavior.
Trying to install full Anaconda - same behavior.
Sanity Check:
Running uname -m returns "aarch64"
Checking the created directory with ls -l confirms that there is a conda.exe file present there.

/etc/init.d/logstash file not created for RHEL 6.8

I downloaded logstash-6.4.0.rpm and Installed with
yum install logstash-6.4.0.rpm
for RHEL 6.8 but etc/init.d/logstash
After installation, I got a message
Successfully created system startup script for Logstash
But the file is not created, it is autogenerated for SysV See here
I tried generating manually by editing /etc/logstash/startup.options added like this
JAVACMD=/opt/java/jdk1.8.0_111/bin/java
JAVA_HOME=/opt/java/jdk1.8.0_111
and then went to /user/share/logstash/bin and ran sudo ./system-install Saw Here
After executing sudo ./system-install again got same message
Successfully created system startup script for Logstash
But still, the file is not created. Any idea, how I can achieve this?
I was able to generate the logstash service I was missing some options in the command.
step 1: check where your logstash is with command whereis logstash > for me :
[root#user ~]# whereis logstash
logstash: /etc/logstash /usr/share/logstash
step 2: edit /etc/logstash/startup.options file and correct path for JAVACMD and JAVA_HOME
JAVACMD=/opt/java/jdk1.8.0_111/bin/java
JAVA_HOME=/opt/java/jdk1.8.0_111
step 3: Go to /usr/share/logstash/bin and run system-install with sudo
sudo ./system-install /etc/logstashstartup.options sysv
Result
[root#user bin]# sudo ./system-install /etc/logstash/startup.options sysv
Using provided startup.options file: /etc/logstash/startup.options
Manually creating startup for specified platform: sysv
Successfully created system startup script for Logstash

audioread in Matlab 2015b on Ubuntu server 14.04

I'm trying to read an audio file into Matlab 2015b and when I run the command
[data, p.fs] = audioread(filename);
I get the following error:
Error using audioread (line 88)
No plugins available for audio file I/O. Ensure that LIBSNDFILE and platform specific libraries are installed correctly.
How to fix it?
Thanks
I solved this error by checking that the ldd directory loaded (on Ubuntu 16.04)
cd /etc/ld.so.conf.d/
Check if the following paths are present in the files:
MCR_ROOT/v91/runtime/glnxa64
MCR_ROOT/v91/bin/glnxa64
MCR_ROOT/v91/sys/os/glnxa64
MCR_ROOT/v91/sys/opengl/lib/glnxa64
If you change anything don't forget to reload the configuration with
sudo ldconfig
I had the same problem. It happened that my Debian environment did not have GStreamer installed. audioread documentation mentioned about it. Please check the link https://www.mathworks.com/help/matlab/ref/audioread.html.
After GStreamer installation audioread function worked as expected.

Google Sitemap Generator error 'is not a supported Apache binary or control script' during installation

I have a LAMP configurated server AMD64 with Ubuntu 14.04 and Apache2 on an EC2 instance.
I followed the official guide here, so first
I downloaded the sitemap_linux-x86_64-beta1-20091231.tar.gz and unpacked it
Then I typed sudo sitemap-install/install.sh –-apache-bin=/usr/sbin/apache2 and here comes my problem:
What is the location of the Apache binary or control script?
[/usr/sbin/apache2] should support -V option.
/usr/sbin/apache2 is not a supported Apache binary or control script.
I'm sure about the location, infact if I restart Apache from the log file I can see AH00094: Command line: '/usr/sbin/apache2'. I have also tried using this as location /usr/sbin/apache2ctl but no way.
I tried searching on Google for days without find anything.
Why I cannot install the Google Sitemap Generator using /usr/sbin/apache2 as location of my Apache?
UPDATE
if I type apache2 -V the output is a list of warning Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} but it's because the request output from the /usr/sbin/apache2 binary directly and so the /etc/apache2/envvars file isn’t sourced as explained here
Doesn't the documentation say to use -a and not --apache-bin, so you should be doing:
sudo sitemap-install/install.sh –a /usr/sbin/apache2
Both my apache2 binary and my apache2ctl control script understand the -V argument:
root#:~# apache2 -V
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 24 2015 17:25:42
root#:~# apache2ctl -V
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 24 2015 17:25:42
Looks to me like you should be doing this:
sudo sitemap-install/install.sh –-apache-bin=/usr/sbin/apachectl
Also the /usr/sbin/apachectl is likely a soft link so just run an ls -la on that if you want to know the real location.

No such file or directory in ubuntu

Receiving following error stack:
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/bin$ cd
dhruv#dhruv-Inspiron-N5010:~$ cd Downloads/hadoop-2.7.1/sbin
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$
sbin/start-dfs.sh
-bash: sbin/start-dfs.sh: No such file or directory
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$
sbin/start-all.sh
-bash: sbin/start-all.sh: No such file or directory
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$ ssh
localhost
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-65-generic x86_64)
Documentation: https://help.ubuntu.com/
Last login: Thu Oct 8 10:50:16 2015 from localhost
dhruv#dhruv-Inspiron-N5010:~$ cd Downloads/hadoop-2.7.1/sbin
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$
sbin/start-dfs.sh
-bash: sbin/start-dfs.sh: No such file or directory
You already changed to the sbin directory, so now you have to use
./start-dfs.sh
instead of
sbin/start-dfs.sh
start-all.sh is a file not a directory,
to run such files you must use ' ./ ' before the executable file,
try :
./start-all.sh

Resources