Error when calling blogdown::build_site on Unix, command fails - rstudio

I am using:
R 3.5.2
Blogdown (latest from CRAN)
Unix CentOS (Docker) on Windows host
Problem
I am trying to build a site in Blogdown. The site I am trying to build is Hugo XMin as it is with no modifications. I have:
Cloned the repository of the Hugo XMin site in my Unix system.
Installed all dependencies on Unix.
Ran command blogdown::build_site() inside the site root folder after entering R in interactive mode in Bash by just using command R.
The error I get is the following:
> blogdown::build_site()
Rendering content/_index.Rmarkdown
running: bash -c "cd ../..;
find . -not -path '*/exampleSite/*' \\( -name '*.html' -o -name '*.css' \\) | xargs wc -l"
pandoc: Error running filter pandoc-citeproc
pandoc-citeproc not found in path
Error: pandoc document conversion failed with error 83
Execution halted
Warning message:
In file.remove(intermediate_html) :
cannot remove file '_index.tmp.html', reason 'No such file or directory'
Error in render_page(f) : Failed to render 'content/_index.Rmarkdown'
On my Windows machine, this works fine.

I was tricked by the message and did not see that pandoc-citeproc is been required but not found. So the fix is easy:
yum install pandoc-citeproc

Related

Laravel Sail on Windows Subsystem for Linux (wsl)

I was trying to create a new laravel app with laravel sail and I ran the following command on ubuntu 20.0.4:
curl -s https://laravel.build/example-app | bash
But I got the following message:
docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
bash: line 16: cd: example-app: No such file or directory
Get started with: cd example-app && ./vendor/bin/sail up
Here is a screen shot
(No folder is created)
You are using a directory with capitals and spaces, i.e: Sennay Files. Use a different directory or rename it to: Sennay_Files.
You are working on the Windows file system from within WSL (i.e. /mnt/c). This will cause a significant performance hit, and issues like the one you are experiancing, consider using the WSL file system. You can change to the WSL file system by typing
cd ~

Installing/running JQ on git bash

I'm trying to implement a git hook that edits some JSON every time I push.
I have JQ installed on my Mac using homebrew "brew install jq", but when the git hook runs my .sh I get the error
jq: command not found
My latest attempts have been to use curl to download the jq library, point to it, and run jq that way:
jq=/usr/local/Cellar/jqz
curl -L -o $jq https://github.com/stedolan/jq/releases/latest/download/jq-osx-amd64
Unfortunately, this is also returning the same 'command not found' error.
Sidenote: jq=/usr/bin/jq gives me a permission error when I try to write to it
jq=/usr/local/Cellar/jqz
curl -L -o $jq https://github.com/stedolan/jq/releases/latest/download/jq-osx-amd64
It looks like you are storing the binary with the name jqz. No surprise that it cannot be executed as jq; you would have to invoke it as jqz.
I don't know if /usr/local/Cellar is part of your PATH?
The canonical way would be:
jq='/usr/local/bin/jq'
curl -L -o "$jq" https://github.com/stedolan/jq/releases/latest/download/jq-osx-amd64
you could also store it in the bin directory of your home folder: `jq="$HOME/bin" which should be added automatically to your PATH on most installations (might require a logout & login).

splitsh / lite: Error when build on Windows 10

https://github.com/splitsh/lite/issues/58
Hello,
I am trying to install splitsh-lite in windows 10. I read #18 and followed the manual instructions until the last step when an error is thrown:
In cmd:
go get github.com/splitsh/lite
github.com/libgit2/git2go
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgit2
collect2.exe: error: ld returned 1 exit status
In MINGW64:
$ go build -o splitsh-lite github.com/splitsh/lite
github.com/libgit2/git2go
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgit2
collect2.exe: error: ld returned 1 exit status
Could you help me or give me some guidelines in order to build splitsh-lite?
Thank you!
Since I had issues on Windows, too, I used the Windows Linux Subsystem. There is no need to get that running in the native Windows command line anymore.
https://learn.microsoft.com/en-us/windows/wsl/install-win10
Install GO
wget -q https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.12.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
Install splitsh
wget -q https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz
tar -zxpf lite_linux_amd64.tar.gz --directory /usr/local/bin/
cp /usr/local/bin/splitsh-lite "$(git --exec-path)"/git-splitsh
The release versions in my commands might be outdated, I did this in November 2019. Please replace them if needed. Then you're ready to perform your repository modifications with splitsh.

Error running bash script

Trying to run the following bash script but get the below error message(s) - any ideas how to correct?
You don't have a wget program on Your mac. The fastest way to get it is via cURL.
curl -O http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz
Extract cURL:
tar -zxvf wget-1.15.tar.gz
open folder:
cd wget-1.15/
And run installer
./configure

Birt - Report Engine Command Line (genReport.sh) not outputting anything

\Hi all,
I just installed version 3.7 and here's what I'm trying to run. It runs for about 30 seconds and doesn't show any errors. The problem is I can't find test.pdf anywhere.
export BIRT_HOME=/opt/local/birt-runtime-3_7_2
cd $BIRT_HOME/ReportEngine/
./genReport.sh runrender -f PDF -o /tmp/test.pdf /opt/local/apache-tomcat-7.0.26/webapps/Birt/user_reports/scientific_services.rptdesign
I also tried running this as the root user with the same result.
Add the "-m" (or --mode) flag before "runrender":
./genReport.sh -m runrender -f PDF -o /tmp/test.pdf /opt/local/apache-tomcat-7.0.26/webapps/Birt/user_reports/scientific_services.rptdesign

Resources