I already installed latex, and specified the path in RSTUDIO_PDFLATEX environment variable.
But it still cannot locate it, and keeps letting me install Miktex or tinytex, which I do not want to. Anyone knows why?
> Sys.getenv("RSTUDIO_PDFLATEX")
[1] "/home/victor/local/texlive/2020/bin/x86_64-linux/pdflatex"
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS ddd.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output ddd.tex --lua-filter /home/victor/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/victor/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in'
output file: ddd.knit.md
! sh: 1: pdflatex: not found
Error: LaTeX failed to compile ddd.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See ddd.log for more info.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
error in running command
Execution halted
No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/
If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()
Otherwise consider MiKTeX on Windows - http://miktex.org
After I put add directory of texlive in the system environment variable PATH, and REBOOT the system, the Rstudio can find pdflatex finally!
However, if someone knows how to use the RSTUDIO_PDFLATEX, welcome to leave comments!
In my case, RStudio did not detect the LATEX even after adding the tex directory to $PATH in Ubuntu-20.04 in WSL. I solved the problem by making the symbolic link files:
$ sudo ln -s /usr/local/texlive/2021/bin/x86_64-linux/pdflatex /usr/bin/pdflatex
$ sudo ln -s /usr/local/texlive/2021/bin/x86_64-linux/xelatex
/usr/bin/xelatex
$ sudo ln -s /usr/local/texlive/2021/bin/x86_64-linux/lualatex /usr/bin/lualatex
Related
I'm trying to install a package called fminuit http://www.fis.unipr.it/~giuseppe.allodi/Fminuit/Fminuit_building.html
on ubuntu 18.04 machine using Octave. The installation step "make -f Makefile.f2c_lnx.Octave" gives me the following error
WrapIO_Matlab.c:4:10: fatal error: mex.h: No such file or directory
Any idea how to remedy this,
cheers, Damir
The build instructions provided by FMINUIT ask you to manually adapt the Makefile to your setup. I'm guessing you did one of those steps incorrectly. I'm running Octave 6.0.0 (current development sources) and worked fine:
$ wget http://www.fis.unipr.it/~giuseppe.allodi/Fminuit/fminuit-src.tar.gz
$ tar xzf fminuit-src.tar.gz
$ cd fminuit-2011.05.31/fminuit/
# modify Makefile.f2c_lnx.Octave
$ make -f Makefile.f2c_lnx.Octave
$ make -f Makefile.f2c_lnx.Octave install
The tricky part is knowing what to modify on the Makefile. For my case, these were the lines (you need to know the exact Octave version and where you installed it):
#Octave prefix directory (typically /usr or /usr/local): modify if needed
-PREFIX=/usr
+PREFIX=/usr/local
#major version number
-OCTAVE_MAJOR=2
+OCTAVE_MAJOR=6
#minor-release version number
-OCTAVE_MINOR=9.12
+OCTAVE_MINOR=0.0
OBJS= mnintr_wrkrnd.o intrac.o WrapIO_Matlab.o doflush.o
MINUIT=Minuit_.o
INSTDIR=../bin/linux_$(ARCH)/octave$(OCTAVE_MAJOR)
The fminuit Makefile will "install" inside the fminuit source directory. You may also want to adjust its INSTDIR value. You need to adjust your Octave path to use it:
>> addpath('/wherever/you/build/fmunuit/fminuit-2011.05.31/bin/linux_x86_64/octave6')
>> fminuit # you probably can figure out how to call this function
error: fminuit: Too few input arguments
I'm installing harbor with source code.
✗ make install
the error is below:
...
Successfully built b917c04731a3
Successfully tagged goharbor/nginx-photon:dev
Done.
/bin/bash: --timeout: command not found
make[1]: *** [_build_registry] Error 127
make: *** [build] Error 2
I've tried to get coreutils and config my path
brew install coreutils
Edit :
The answer of #Arne Vogel is more likely to point the real problem.
Indeed it would be surprising that you don't have the command /bin/bash (so the steps I described here won't solve the issue).
coresutil is composed of GNU version of the most famous commands (cat, head, tail, wc, sort...), so it's not directly related to your problem.
You can use brew to install the latest version (version 5) of bash:
brew install bash
Double check if you really don't have a bash inside your /bin/:
sudo ls /bin/bash
It should returns a line like this (pay attention to the permission):
-r-xr-xr-x 1 root wheel 618416 Nov 30 12:55 /bin/bash
If it returns no result, then you may create a link:
sudo ln -s $(which bash) /bin/bash
TBH, I don't know about harbor, but this error seems to be caused by bad formatting in a script, specifically something like:
some-command --some-option --some-other-option \
--timeout
Now if the backslash (to continue the line) is missing, some-command will first be executed (without the --timeout option), and then bash will try to execute a command called --timeout, which, unsurprisingly, does not exist.
This problem can also be caused by an extraneous space after the backslash, a stray semicolon, wrong line terminators (in particular, Windows-style CRLF) etc.
Here are some suggestions for what you could do:
Make sure you have downloaded the source package appropriate for Mac OS X. Many open source packages are distributed in different formats, e.g. .zip and/or .7z for Windows, .tar.gz and/or .tar.bz2 for UNIX. You need either of the latter.
Check the documentation and/or forums, obviously.
If that doesn't help, use ktrace to find the offending script, and then look at it in a text editor. If you do find a bug in a script, consider reporting it to the developers.
background
I really would like to search for a term in a directory full of Word docs. So I stumbled across this lovely solution. However this solution requires that catdoc is installed on mac.
what I have tried
now homebrew obviously doens't have catdoc:
$ brew install catdoc
Updating Homebrew...
Error: No available formula with the name "catdoc"
==> Searching for a previously deleted formula...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
macports does, but I use homebrew and It's not a good idea to have both on my machine.
So I did what any self respecting semi-programmer would do: try to install it from source:
$ ./configure
see outpout
$ ./make
see output
the last part of ./make gives me this
1 warning generated.
gcc -o catppt catppt.o pptparse.o charsets.o substmap.o fileutil.o confutil.o numutils.o ole.o -lm
echo "#! /usr/bin/wish" >wordview
echo set charset_lib "\"/usr/local/share/catdoc\"">>wordview
cat wordview.tcl >>wordview
chmod 0755 wordview
touch build
make[1]: Nothing to be done for `all'.
then when i run make install i get this
make: `install' is up to date.
and obviously catdoc doesn't work:
$ which catdoc
>> nothing
Question
How can I install this?
You could just use the built-in textutil to convert MS-Word documents to text:
textutil -stdout -cat txt SomeFile.doc
or
textutil -stdout -cat txt *.doc
To build catdoc / catppt / xls2csv on Mac OS X (macos)
tested with catdoc-0.95 on Mac OS X 10.9.5
Configuration
First, unless your documents are likely to be written in a Cyrillic language, start with:
$ ./configure --with-input=cp1252 --with-output=mac-roman
(if you are more likely to encounter files from Windows)
... or ...
$ ./configure --with-input=mac-roman --with-output=mac-roman
(if you are more likely to encounter files from MacOS)
Building
$ make all (or just $ make)
Installation
make --directory=src install; make --directory=doc install; make --directory=charsets install
This should compensate for the error you received, abbood. It appears the primary Makefile isn't running the install portion of the three subdirectories, for some reason. If a permissions error is reported, precede the above command with "sudo".
I don't believe this should be necessary, but I'm not familiar enough with makefiles to provide a more proper (textbook) fix.
One can, of course, get the same effect by:
$ cd src
$ make install
$ cd ../doc
$ make install
$ cd ../charsets
$ make install
$ cd ..
Cleanup
To remove all files created by make, type:
$ make clean
To remove all files created by make as well as those created by ./configure, type
$ make distclean
This is a kinda silly question. I've installed Inkscape on my mac (Marvericks OS) following this page http://www.inkscape.org/en/download/mac-os/
I know there is a command line option with inkscape. I tried to type inkscape on Terminal and there is no such command. I'm confused... Does this mean that I need to install the linux version of inkscape in order to use the command line?
I have Inkscape installed in /Applications and running this from a terminal does the trick:
/Applications/Inkscape.app/Contents/MacOS/inkscape --help
Usage: inkscape-bin [OPTIONS...] [FILE...]
Available options:
-V, --version Print the Inkscape version number
... etc.
For ease of use symlink it to /usr/local/bin i.e.:
ln -s /Applications/Inkscape.app/Contents/MacOS/inkscape \
/usr/local/bin/inkscape
In general, on MacOS Inkscape needs to be called with an absolute path, and all files given as arguments should also be full paths. See also:
https://bugs.launchpad.net/inkscape/+bug/1449251
As of 2020, the executable on MacOS is now located at
/Applications/Inkscape.app/Contents/MacOS/inkscape
You can symlink it with:
ln -s /Applications/Inkscape.app/Contents/MacOS/inkscape \
/usr/local/bin/inkscape
More info about command line usage here.
I think some paths and filenames have changed over time and today you should add a symlink in /usr/local/bin to point to the bin directory of inkscape:
sudo ln -s /Applications/Inkscape.app/Contents/Resources/bin/inkscape /usr/local/bin/inkscape
Full credit to #Scott above who has this correct "answer" showing as a comment. This solution allows other subcommands of inkscape to work correctly, whereas creating an alias does not.
I am trying to create tags using ctags and getting the error
ctags: Unknown option: -p
There is a similar question asked before. But i could not understand that solution. I'm very sorry for posting the same question again.
I am trying to generate tags for C and C++ files.
OS: ubuntu 10.04LTS
ctags version : 5.8 (Exuberant ctags)
$which ctags : /usr/bin/ctags
There is a .ctags conf file in my home directory, but it is empty.
I tried to generate the tags using the below command
ctags -append=yes -R /home/jabez/mycodedir
I am using the "-append" option because i want to append the tags generated from other directories to the same tags file.
Installation procedure i followed:
./configure --disable-etags
make
make install
Please help me how i can fix the problem.
The problem is that you use -append with a single dash, it should be a double dash: --append.
With single dash, the argument is parsed as a series of one-letter arguments: -a -p -p -e -n -d.