R-Markdown Problems to knit on Linux - r

I'm installed R-Studio on Linux (Fedora 31). Now I want to knit an element with R-Markdown. In this case this is the default- example template.
But in the end of the knitting-process the following error-message appears:
*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.
*** WARNING ***: This is almost NEVER what you want to do.
*** WARNING ***: Try using dnf install/update instead.
*** WARNING ***: If performing this action is really what you want to do, pass the "ignore-warning" option.
*** WARNING ***: But please do not file any bugs with the OS Vendor.
add of symlinks had 3 error(s), see messages above.
add_link_dir_dir: destination /usr/local/bin not writable, no links from /usr/share/texlive/bin/x86_64-linux.
add_link_dir_dir: destination /usr/local/share/info not writable, no links from /usr/share/texlive/texmf-dist/doc/info.
man symlink destination (/usr/local/share/man) not writable, cannot add symlinks.
tlmgr: An error has occurred. See above messages. Exiting.
! LaTeX Error: File `framed.sty' not found.
! Emergency stop.
<read *>
Fehler: LaTeX failed to compile test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test.log for more info.
What can I do to solve this problem?

The best bet is to install a separate copy of tex-live as the warning recommends not messing with Fedora's pre-installed version of tex-live, which most likely is needed for other resources in Fedora.
First download texlive - https://www.tug.org/texlive/acquire-netinstall.html
You need to make the destination folder available to you $USER so add them to the folder location of where you are going to install tlgm to install to, the default is /usr/local/texlive with -R being recursive.
$ sudo chown -R $USER /usr/local/
$ cd Downloads
$ $ tar -xzvf install-tl-unx.tar.gz
$ cd install-tl* # enter the tex-live main folder
$ perl install-tl
You will now see a menu option in the command-line interface. At the "Enter Command" type "O + Enter".
On the next menu press "L + Enter" to create a symbolic link to the directors available to your user. In my case /usr/local/*.
Finally, press "R + Enter" to return to the main menu, followed by "I + Enter" to start to install tex-live.
Lastly, set-up the texlive path in sudoers and add the path to Defaults secure path = to add your texlive binary file location i.e. on my machine it is /usr/local/texlive/2019/bin/x86_64-linux
$ sudo nano /etc/sudoer

Related

Cloning Pintos with Ubuntu

I am trying to start doing the Pintos Stanford project on Ubuntu. I downloaded the tar file that the Stanford website provides but when I try and run
pintos -- run alarm-multiple
I get the following error:
Unrecognized character \x16; marked by <-- HERE after if ($<-- HERE near column 7 at /home/adambomb/src/pintos/src/utils/pintos line 911
I found on another stackoverflow post that I should pull from latest version of pintos:
git clone git://pintos-os.org/pintos-anon pintos
But doing this gets me an error:
Cloning into 'pintos'...
fatal: read error: Connection reset by peer
I'm not really sure where to go from here and could use some insight to fix either of these problems.
I don't really know where to go from here.
I ran into the same issues as you trying various guides on the internet (eg. this guide) and looking through StackOverflow. However, this youtube video helped me the most.
Steps below can be found here. I'm using Ubuntu 18.04.
Run sudo apt-get install qemu
Get latest pintos source code from pintos public git repository or download older version with this link
2a. Under heads, find master and click the tree hyperlink
2b. Click snapshot and download the .tar.gz file to your directory
Run tar -xvzf pintos-anon-master-{value}.tar.gz where {value} is the commit-id
Open /utils/pintos-gdb with vim and edit GDBMACROS variable to point to the full path for pintos directory
Open Makefile with vim and edit LOADLIBES variable name to LDLIBS
Compile utils directory by navigating to /src/utils and running make
Edit /src/threads/Make.vars (line 7): change bochs to qemu
Compile threads directory by navigating to /src/threads and running make
Edit /utils/pintos (line 103): replace bochs with qemu
Edit /utils/pintos (~line 257): replace kernel.bin with the full path to kernel.bin
Edit /utils/pintos (~line 621): replace qemu with qemu-system-x86_64
Edit /utils/Pintos.pm (line 362): replace loader.bin with the full path to loader.bin
Open ~/.bashrc and add export PATH=/home/.../pintos/src/utils:$PATH to the last line.
Reload terminal by running source ~/.bashrc
Run pintos with pintos run alarm-multiple

php-cs-fixer got broken for linux users after fixing the issue 6 for windows users

I use Linux Ubuntu 16.04. I have well installed php-cs-fixer for atom 1.9.8.
$ php-cs-fixer
PHP CS Fixer version 1.11.6 by Fabien Potencier
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
fix Fixes a directory or a file
help Displays help for a command
list Lists commands
readme Generates the README content, based on the fix command help
self-update Update php-cs-fixer.phar to the latest version.
selfupdate Update php-cs-fixer.phar to the latest version.
The problem comes with config of php-cs-fixer with atom. In fact, package requires:
a PHP Executable path (which is by defaut php) (for linux user it must be empty which is not possible with actual version of the package) (see isse #6 )
a PHP-CS fixer Executable path (which is simply for linux user php-cs-fixer (without the use of PHAR file))
Consequently, when I run php-cs-fixer from atom I get this error: Could not open input file: php-cs-fixer.
I can generate this error message with this console command:
php php-cs-fixer fix Class.php
Could not open input file: php-cs-fixer
So, can you make PHP Executable path optional (not compulsory) for that package of atom???
thanks,
Update on this issue:
I managed to download php-cs-fixer.phar from https://github.com/FriendsOfPHP/PHP-CS-Fixer and I put it in the folder ~/.composer/ so that:
a PHP Executable path is php
a PHP-CS fixer Executable path is: ~/.composer/php-cs-composer.phar
But now I am getting this error: Could not open input file: ~/.composer/php-cs-fixer.phar
So what's wrong??
For you information, running the console php ~/.composer/php-cs-composer.phar Class.php command is successful.
The solution is found on github:
a PHP Executable path is php
a PHP-CS fixer Executable path is: /home/username/.composer/php-cs-composer.phar and don't use the ~ in atom.

Getting install_pyuic5 error during PyQt5 install

I have built source files for installing PyQt5 but when I executed sudo make install, after a while, it prompts this error message:
sudo make install
.
.
.
install -m 755 -p /home/bora/Desktop/PyQt-gpl-5.4.1/pyuic5 /usr/bin/
strip /usr/bin/pyuic5
strip:/usr/bin/pyuic5: File format not recognized
make: [install_pyuic5] Error 1 (ignored)
How can I fix this problem? I am using Qt 5.4.1 and I am sure that I have properly set the path to Qt5's qmake. If I didn't, it would gave me an error during compilation of source files. Do I need to install any dependecy for PyQt5 another than SIP?
I incurred in the same problem after following this link:
https://michalcodes4life.wordpress.com/2014/03/16/pyqt5-python-3-3-in-virtualenv-on-ubuntu/, I managed to narrow the errors down to the one you're reporting.
Notice in the link where it mentions to run configure.py with the -verboseflag:
python configure.py -verbose --qmake /path/to/Qt/5.2.1/gcc_64/bin/qmake --sip-incdir=/usr/include/python3.3m
Go through the stacktrace and see if the error you reported is the only one. If that is so then ignore it as it's just a "warning" in Python parlance. In your command line enter:
import sip
import PyQt5
should give no errors.
It's not really an error, so you can safely ignore it (just as make did).
The output is coming from the strip command, which is mainly used for removing debugging symbols from binaries. However, /usr/bin/pyuic5 is a shell-script rather than a binary, and so strip cannot process that file. As a consequence, it outputs a warning message and returns a non-zero exit status. The make process sees this, but has been configured to ignore it, and so there is no fatal error.

Installing Symfony on Mac OS X

I am having trouble installing this framework.
I entered this command on terminal as per the instructions on http://symfony.com/doc/current/quick_tour/the_big_picture.html. This was from the desktop.
$ php -r "readfile('http://symfony.com/installer');" > symfony.phar
The next part requires me to add this code:
$ sudo mv symfony.phar /usr/local/bin/symfony
Now I get this error:
mv: rename symfony.phar to /usr/local/bin/symfony: Not a directory
Please help me resolve this.
Try and move it to /usr/bin instead.
The directory you're trying to move it to doesn't exist. The instructions you're following may not be intended for OS X users.
The executable can go anywhere that's in your PATH.

Error installing libsigsegv on ubuntu

While installing libsigsegv for clisp, I have run into an error. "make install" does not finish correctly. The problem as I can see it is a permission issue. I am very new to Unix and cant figure out how to solve this issue. Can you help me please to solve this issue? Any suggestions highly appreciated.
me#me-VPCSB11FX:~/school/summer/libsigsegv/libsigsegv$ make install
Making install in src
make[1]: Entering directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
make[2]: Entering directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ../libtool --mode=install /usr/bin/install -c 'libsigsegv.la' '/usr/local/lib/libsigsegv.la'
/usr/bin/install -c .libs/libsigsegv.lai /usr/local/lib/libsigsegv.la
/usr/bin/install: cannot create regular file '/usr/local/lib/libsigsegv.la': Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
make: *** [install-recursive] Error 1
The installation step is trying to write to a shared directory /usr/local/lib, which is read-only for end users and writable only for administrators and such.
You would need to give yourself additional privilleges by using su or sudo -- see e.g. here.
Also please note that installing custom stuff this way of make install is not very nice nowadays. You should be using some package management system like RPM or Aptitude or whatever, depending on your Unix distribution. It handles uninstallation, dependencies, conflicts, updates and everything else automatically.
The detailed installation instructions are found in the INSTALL or INSTALL.generic file, for every GNU package. For GNU libiconv it is this file: http://git.savannah.gnu.org/gitweb/?p=libsigsegv.git;a=blob;f=INSTALL
The default installation location, /usr/local, is not writable by an ordinary user. You have three options:
Use sudo make install instead of make install.
Make the /usr/local directory and its subdirectory owned by yourself, instead of owned by root: chown -R $(id -u -n) /usr/local
Specify a different installation directory (see section "Installation Names" of said INSTALL file): For example: ./configure --prefix=${HOME}/gnu/arch/$(uname -p)

Resources