I'm using 7zip to compress a large folder into an archive and I'm password protecting it.
I installed 7zip through the mirrors:
wget https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/Packages/p/p7zip-16.02-10.el6.x86_64.rpm
wget https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/Packages/p/p7zip-plugins-16.02-10.el6.x86_64.rpm
sudo rpm -U --quiet p7zip-16.02-10.el6.x86_64.rpm
sudo rpm -U --quiet p7zip-plugins-16.02-10.el6.x86_64.rpm
To create the archive, I run 7z a archive.zip output/* -pMyPassword.
It takes ~30 minutes but finishes scanning the drive outputting:
Scanning the drive:
95966 folders, 6573468 files, 1178143530189 bytes (1098 GiB)
Then it starts to create the archive before failing with the following error:
/bin/7z: line 2: 9979 Segmentation fault "/usr/libexec/p7zip/7z" "$#".
It seems to be related to the binary itself but I cannot find this error mentioned on the 7zip forums or here on Stackoverflow, so I figured I'd write this up to see if anyone has any ideas.
This is the version info:
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Xeon(R) CPU E5-2676 v3 # 2.40GHz (306F2),ASM,AES-NI)
Related
I have a ruby on rails app that uses pandoc-ruby to convert markdown files into pdf.
The pandoc-ruby requires pandoc installation. To successfully convert to pdf, pdflatex needs to be present as well. Locally (tested on Mac and Ubuntu 18.04) everything is working if pandoc, texlive-latex-recommended and texlive-fonts-recommended packages are installed. Things get a little bit tricky when deploying to heroku.
To install all the packages on heroku I've used the Aptfile approach and I have not been able to solve this.
Approach 1: Aptfile
I've specified this Aptfile:
# Aptfile
texlive-latex-recommended
texlive-fonts-recommended
https://github.com/jgm/pandoc/releases/download/2.11.3.2/pandoc-2.11.3.2-1-amd64.deb
The error that I'm getting is:
2021-01-22T21:46:03.478937+00:00 app[web.1]: [6ac45926-62f3-48bf-98b5-8f7c1022a02f] RuntimeError (warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
2021-01-22T21:46:03.478938+00:00 app[web.1]:
2021-01-22T21:46:03.478938+00:00 app[web.1]: kpathsea: Running mktexfmt pdflatex.fmt
2021-01-22T21:46:03.478940+00:00 app[web.1]: warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
2021-01-22T21:46:03.478940+00:00 app[web.1]: /app/.apt/usr/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
2021-01-22T21:46:03.478942+00:00 app[web.1]: BEGIN failed--compilation aborted at /app/.apt/usr/bin/mktexfmt line 28.
2021-01-22T21:46:03.478942+00:00 app[web.1]: warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
2021-01-22T21:46:03.478942+00:00 app[web.1]:
2021-01-22T21:46:03.478943+00:00 app[web.1]: kpathsea: Running mktexfmt pdflatex.fmt
2021-01-22T21:46:03.478943+00:00 app[web.1]: warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
2021-01-22T21:46:03.478944+00:00 app[web.1]: /app/.apt/usr/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
2021-01-22T21:46:03.478944+00:00 app[web.1]: BEGIN failed--compilation aborted at /app/.apt/usr/bin/mktexfmt line 28.
2021-01-22T21:46:03.478945+00:00 app[web.1]: Error producing PDF.
2021-01-22T21:46:03.478947+00:00 app[web.1]: This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
2021-01-22T21:46:03.478947+00:00 app[web.1]: I can't find the format file `pdflatex.fmt'!
2021-01-22T21:46:03.478947+00:00 app[web.1]:
2021-01-22T21:46:03.478948+00:00 app[web.1]: ):
I've tried to use heroku run bash to try and figure out what's going on. All the packages seem to be installed, but a simple pandoc command fails, see the output below.
~ $ pandoc -v
pandoc 2.11.3.2
Compiled with pandoc-types 1.22, texmath 0.12.1, skylighting 0.10.2,
citeproc 0.3.0.3, ipynb 0.1.0.1
User data directory: /app/.local/share/pandoc or /app/.pandoc
Copyright (C) 2006-2020 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
~ $ pdflatex -v
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.01
~ $ pandoc test.md -o test.pdf
warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
kpathsea: Running mktexfmt pdflatex.fmt
warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
/app/.apt/usr/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /app/.apt/usr/bin/mktexfmt line 28.
warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
kpathsea: Running mktexfmt pdflatex.fmt
warning: kpathsea: configuration file texmf.cnf not found in these directories: /etc/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texlive/texmf-dist/web2c:/app/.apt/share/texmf/web2c.
/app/.apt/usr/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /app/.apt/usr/bin/mktexfmt line 28.
Error producing PDF.
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
I can't find the format file `pdflatex.fmt'!
Approach 2: custom buildpacks
I've also tried with 2 custom buildpacks for TeX Live found here and here.
It was looking more promising but it still produces an error when converting to pdf. See the output from heroku run bash below.
~ $ pandoc -v
pandoc 2.11.3.2
Compiled with pandoc-types 1.22, texmath 0.12.1, skylighting 0.10.2,
citeproc 0.3.0.3, ipynb 0.1.0.1
User data directory: /app/.local/share/pandoc or /app/.pandoc
Copyright (C) 2006-2020 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
~ $ pdflatex -v
pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020)
kpathsea version 6.3.2
Copyright 2020 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.02
~ $ pandoc test.md -o test.pdf
Error producing PDF.
! LaTeX Error: File `xcolor.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.36 \IfFileExists
After quite a bit of trial and error, I have found a solution that works.
As #mb21 mentioned, Docker image would probably be the best option long term. Docker images are supported on Heroku. However, I wanted to avoid dockerizing the whole application to solve this issue.
After finding a TeX Live buildpack for Heroku that supports adding custom TeX Live packages (one example of such buildpack), the error on conversion was ! LaTeX Error: File 'xcolor.sty' not found.
I used tlmgr to get some info on the missing file. Running tlmgr search --global --file xcolor.sty does the trick and reveals that there is a package called xcolor. After installing that we come to the next error, and the next, and the next. In the end I ended up installing 2 collections that are small enough for Heroku (mind the 500MB slug size limit) and contain everything pandoc needs for a successful conversion. Those 2 are collection-fontsrecommended and collection-latexrecommended.
Adding a texlive.packages file to the root of the application does the trick. It is recognized by the buildpack and it installs all the specified packages for you using tlmgr.
# texlive.packages
collection-fontsrecommended
collection-latexrecommended
I have tried to run cdo sinfon command on Windows 7 cygwin -x86_64 environment but have consistently encountered with the following error. I have installed all required packages like gcc, gcc-gfortran, openssl, openssh, curl, zlib, netcdf, libnetcdf-devel, udunits-devel, proj-devel etc. I have run the following commands---
SID#SID-PC ~
$ cd /cygdrive/C/demo/tas
SID#SID-PC /cygdrive/C/demo/tas
$ PATH="$PATH:.:"
SID#SID-PC /cygdrive/C/demo/tas
$ cdo sinfon Ind.nc
C:/demo/tas/cdo.exe: error while loading shared libraries: cygproj-13.dll: cannot open shared object file: No such file or directory
SID#SID-PC /cygdrive/C/demo/tas
$ uname -a
CYGWIN_NT-6.1 SID-PC 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin
Asking the right tool
Usage: cygcheck [-v] [-h] PROGRAM
...
-p, --package-query search for REGEXP in the entire cygwin.com package
repository (requires internet connectivity)
...
you have
$ cygcheck -p cygproj-13.dll
Found 3 matches for cygproj-13.dll
libproj13-5.0.1-1 - libproj13: The PROJ Cartographic Projections Software
libproj13-5.1.0-1 - libproj13: The PROJ Cartographic Projections Software
libproj13-5.2.0-1 - libproj13: The PROJ Cartographic Projections Software
You need to install the libproj13 package.
I'm trying to build a Linux-developed C++ project on a Windows 7 machine, and I figured that Cygwin would be one of the easiest ways to run the necessary build and compilation scripts (in my case, autoconf, make, and g++). I'm starting to run into problems, and I'd appreciate it if someone could showing me if I'm installing or doing something incorrectly.
I can install Cygwin with Chocolatey with the command
choco install -y cygwin
which places Cygwin in the C:\tools\cygwin directory. For convenience, I add C:\tools\cygwin\bin to my PATH.
Next I install the necessary packages in quiet mode with
C:\tools\cygwin\cygwin_setup.exe -q -P autoconf,make,gcc-g++
If I enter the command make, then that program runs and gives me the expected error message. But if I enter autoconf, then I get the following error:
'autoconf' is not recognized as an internal or external command, operable program or batch file.
I assume the reason is because, unlike most of the scripts in Cygwin's bin directory (such as make), this one is not a .exe file. When check the contents of autoconf in a text editor, I see just a single garbled line:
㰡祳汭湩㹫/usr/share/autotools/ac-wrapper.sh
The initial characters seem pretty suspect, but my guess is that the script is supposed to call the C:\tools\cygwin\usr\share\autotools\ac-wrapper.sh script.
So I tried to run that script as an executable with
C:\tools\cygwin\usr\share\autotools\ac-wrapper.sh
The first time I did this, it successfully generated the configure executable. I thought I had everything solved. But after I cleaned up the autoconf outputs and tried again, nothing happened. Even if I close the shell window and try again, a window briefly appears with a message and disappears, but nothing else happens.
I can see the message if I run the wrapper script with
sh C:\tools\cygwin\usr\share\autotools\ac-wrapper.sh
The message turns out to be the following error:
ac-wrapper: Unable to locate any usuable version of autoconf.
I tried these versions: 2.69:2.5 2.68:2.5 9999:2.5 2.99:2.5 2.98:2.5 2.97:2.5 2.96:2.5 2.95:2.5 2.94:2.5 2.93:2.5 2.92:2.5 2.91:2.5 2.90:2.5 2.89:2.5 2.88:2.5 2.87:2.5 2.86:2.5 2.85:2.5 2.84:2.5 2.83:2.5 2.82:2.5 2.81:2.5 2.80:2.5 2.79:2.5 2.78:2.5 2.77:2.5 2.76:2.5 2.75:2.5 2.74:2.5 2.73:2.5 2.72:2.5 2.71:2.5 2.70:2.5 2.69:2.5 2.68:2.5 2.67:2.5 2.66:2.5 2.65:2.5 2.64:2.5 2.63:2.5 2.62:2.5 2.61:2.5 2.60:2.5 2.59:2.5 2.5x:2.5 2.13:2.1
C:\tools\cygwin\usr\share\autotools\ac-wrapper.sh: line 19: printf: missing unicode digit for \u
With a base name of 'C: ools\cygwin\usr\shareutotoolsc-wrapper.sh'.
I assume that last Unicode-related error is due to the CJK characters in the autoconf file, but the issue with finding a usable version of autoconf is more concerning. What's going on here? Shouldn't I be able to run autoconf from the Windows command-line with Cygwin installed?
Most of the cygwin programs are implemented as special link, that works only
from a cygwin shell (like bash):
$ cd /usr/bin
$ ls -l autoconf
lrwxrwxrwx 1 Marco Kein 34 Oct 15 2018 autoconf -> /usr/share/autotools/ac-wrapper.sh
$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
These links for not-cygwin programs are normal files and they can not use them
D:\cygwin32T\bin>dir /a:s autoconf.*
Datenträger in Laufwerk D: ist DATA
Volumeseriennummer: D603-FB6E
Verzeichnis von D:\cygwin32T\bin
15.10.2018 08:53 82 autoconf
1 Datei(en), 82 Bytes
0 Verzeichnis(se), 662.133.735.424 Bytes frei
The best way to use cygwin effectively is to run the provided Cygwin Terminal (aka Mintty) that will start a cygwin shell. Running Cygwin programs from windows CMD could cause unexpected results.
Trying to install Freedos (v1.2) in Qemu - and it fails always with the same error: Unable to locate the installation packages..
On the web there are versions of the same guide on how to do this: https://opensource.com/article/17/10/run-dos-applications-linux
I can create the image for the hard drive, then run qemu:
qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw sb16,adlib -device cirrus-vga -cdrom FD12FULL/FD12FULL.img -hda freedos.img -boot order=d
The installation process starts successfully, it finds the hard drive images, then it formats it and mark as primary. Then I can select the language and start the installation - on the next screen it shows a dialogue to gather information about the machine - and the next screen is the failure:
I've tried the following options when starting qemu:
for cdrom using the "standard" / "legacy" / "full" / "lite" Freedos installation CD images
using both these 4 CD images with and without the official Freedos installation Floppy
booting from CD and booting from Floppy
attaching the CD img as img or as mounted drive
If I select No - Return to DOS I always see 3 drives: (A:) having the CD image, (B:) floppy image, (C:) the empty attached drive image and a (D:) drive which is not readable.
Looked at a few findings in google (case 1, case 2) but didn't really helped much.
seems to be a bug in seabios regarding support of ATA CDROMs, see https://patchwork.kernel.org/patch/10857581/ and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934134
In case anyone else is looking for an answer. The problem was due to a version of seabios that has a CD driver bug. If you download the latest version and compile it. You should be able to provide the "-bios <your_newer_compiled_seabios>" to the qemu command line to get around this problem.
What I did was follow these steps:
# Get a newer version of the seabios:
$ git clone https://git.seabios.org/seabios.git
# Change directory and compile it
$ cd seabios
$ make
...
Total size: 185536 Fixed: 87584 Free: 76608 (used 70.8% of 256KiB rom)
Creating out/bios.bin
Then I used the out/bios.bin bios in your qemu command line to load it:
$ <your-qemu-command-line> -bios out/bios.bin <any other command options>
Hope that helps other folks running into the same problem.
I have been struggling in installing a CPAN module called Date::Calc on my windows machine having strawberry perl distribution(strawberry-perl-5.28.1.1-64bit). It does not give any error in any of the steps but ultimately I can't find that it has been installed. I have downloaded the module from CPAN org website and followed the steps like unzip, perl Makefile.pl, make, make test, and make installs. Please help what am I missing or where am I going wrong?
I followed following steps:
Strawberry perl(5.28.1.1-64-bit) is already installed on my machine(I installed it a month back). That is running fine.
Set PATH variable to point to perl/bin folder where the bin folder exist. First, I tried command cpan Date::Calc. It gave me errors like timeout while fetching the required files. I suspect this to be an issue with my client IT/proxy infrastructure:
C:\SummitTools6.1\CPANModules>cpan Date::Calc
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.212)
CPAN: LWP::UserAgent loaded ok (v6.36)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (A connection attempt
failed because the connected party did not properly respond after a period of time, or established c
onnection failed because connected host has failed to respond.)]
Warning: no success downloading 'C:\SummitTools6.1\perl\cpan\sources\authors\01mailrc.txt.gz.tmp12016'. Giving up on it.
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to www.cpan.org:80 (Invalid argument)]
Warning: no success downloading 'C:\SummitTools6.1\perl\cpan\sources\authors\01mailrc.txt.gz.tmp12016'. Giving up on it.
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
Then I tried manually downloading the tar.gz file of the module I am interested in from metacpan.org.
Copied the file to a separate location than the strawberry perl installation.
gzip zxvf Date-Calc-6.4.tar.gz
cd Date-Calc-6.4
perl Makefile.pl
make
make test
make install
All steps ran fine but what is surprising is the last three steps as they finished in split second and printed just three lines in stdout.
make[13]: Entering directory '/cygdrive/c/SummitTools6.1/CPANModules/Date-Calc-6.4'
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\SummitTools6.1\CPANModules\Date-Calc-6.4>C:\SummitTools6.1\CPANModules\Date-Calc-6.4>
Also to be noted that if I run
make >> 1.txt
in order to capture it's output in a text file, it hangs in dos shell. However, meanwhile I can open the text file which shows the same content as pasted above in italics(same as being shown in standard output on terminal earlier if I do not rerout to a text file).
As it is hung, If I interrupt Ctrl+C, it shows a couple of lines like below:
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>make
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>make >> 1.txt
make[1]: *** [blib\lib\Bit/.exists] Interrupt
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>Makefile:393: recipe for target 'blib\lib\Bit/.exists'
failed
make: *** [blib\lib\Bit/.exists] Interrupt
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>
As Date::Calc is dependent upon Bit::Vector module, I had to run all the same steps for Bit::Vector first followed by Date::Calc. But Got the same issues/errors/no errors for both the modules.