zip error after 7-zip install and uninstall - windows

I am using zip in Cygwin under Windows 10 and after installing 7-Zip on my system and then uninstalling it, I get the following error when using zip on the command line in Cygwin when trying to zip any files:
zip warning: name not matched: Files\7-zip
zip warning: name not matched: testing
E.g. zipping 2 files a and b:
zip testing a b
will give the error. How do I get rid of this nuisance?
Reinstalling zip did not help.

After a further extensive search with no answers I found out what the problem was.
7-Zip sets up an environment variable ZIP=C:\Program Files\7-zip and for some reason the existence of a ZIP variable interferes with the GNU zip utility.
I unset ZIP by doing ctrl-Esc and typing env which brought up the control panel option of "Edit environment variables for your account" and removed the ZIP variable and it now works.

Related

'bash: make: command not found' on windows after setting environment variable

I need to install make command on windows, and I am told to follow the guide here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058#make, which is quoted as follows:
Go to ezwinports.
Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).
Extract zip.
Copy the contents to your Git\mingw64\ merging the folders, but do NOT overwrite/replace any existing files.
(Keep in mind you can easy add make, but it doesn't come packaged with all the standard UNIX build toolchain--so you will have to ensure those are installed and on your PATH, or you will encounter endless error messages.)
But after finishing those steps (extract zip and merging the folders), I run the make command and get a bash: make: command not found error.
I have added 'C:\Program Files\Git\mingw64\bin' to my PATH environment variable and have confirmed that file 'make.exe' exists in 'C:\Program Files\Git\mingw64\bin'.
I find one or two similar problems asked under the comments of the guide website, but they just haven't get answers;
and I also find some answers on stackOverFlow that says using choco install make instead, but I'm not sure if these two packages are the same.
Can you give me some suggestions to fix this?

Install pandoc with no administrator access

I'm am using rmarkdown to generate a word output and need pandoc to do so. Unfortunately I do not have administrator access on my work computer so I can't run the installer or use the install.pandoc() option.
I have tried downloading both the .zip and .tar.gz files from the github site and tried to install them manually using the "install" tab in RStudio, but get the error:
Warning in install.packages :
cannot open compressed file 'pandoc-2.2.1-windows-x86/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
Here states "If you prefer not to use the msi installer, we also provide a zip file that contains pandoc’s binaries and documentation. Simply unzip this file and move the binaries to a directory of your choice."
maybe I don't know what they mean by "move the binaries to a directory of your choice." - When I unzip the files, I still cannot access the package.
Side note - I have defined .libpaths() to allow me to install other packages, but i cannot get pandoc to work.
Any suggestions on how to do this?
Pandoc is a terminal application and does not require R-Studio to install it unziping the .tar.gz file with
linux: tar -xzvf filename.tar.gz
for windows the binary is the program pandoc itself that is unzipped from the zip file
simply unzip the file and pandoc should already be installed in the unzipped folder
after unzipping you might want to move pandoc.exe (for windows) int the directory where the project is located so that it is recognized
So there are two steps in this process for me to get it to work.
1: Install Pandoc
First download the MSI from https://github.com/jgm/pandoc/releases/
If you have trouble installing the MSI by right clicking on it, try creating a batch file with the contents:
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
Then drag and drop the MSI on to this batch file and it will install without asking for any admin privileges.
2:
You'll need to tell the script to find Pandoc if its not running in RStudio already:
if(Sys.getenv("RSTUDIO") != "1"){rmarkdown::find_pandoc(dir = Sys.getenv("pandoc_path"))}
For me Sys.getenv("pandoc_path") = C:/Users/[username]/AppData/Local/Pandoc

How do I add a file to a directory in terminal?

I am trying to add files to a directory that I created, and I attempted to use
cvs add filename
but that did not work, as I got the error message:
-bash: cvs: command not found
How do I fix this and be able to add files to a directory?
It's either cvs has not been installed or not found in the environment path variable e.g. $PATH. If you're sure that you have installed cvs successfully, try to execute the cvs command by using its absolute path.

libcurl-4.dll is missing after installing curl on Windows 7

After installing curl as per this guy's instructions :
Except for Step 2: Installed Win64 OpenSSL v1.0.1u Light instead since version k is missing from the download page : http://slproweb.com/products/Win32OpenSSL.html
On cmd prompt I just type :
C:\Windows\system32>curl
and get this error:
How do I get curl working on my computer?
After extracting the Zip file to a specific location.
You should add the file location to the PATH Environment.
Unfortunately, you would also have to copy all the dll file from the lib folder and paste in the folder that contains the executable.

How to install SWIG?

Noob question ahead...
I'm trying to install SWIG on Windows. According to the INSTALL document, I have to
cd to the directory containing the package's source code and type ./configure to configure the package for your system.
I tried the command in both the root directory and in the /CCache directory (these are the only ones that have the configure and configure.in files), however, the shell reports back that
C:\swigwin-2.0.4>./configure
'.' is not recognized as an internal or external command,
operable program or batch file.
What am I missing?
no installation is needed. you just have to set the environment variable to point to the "swig" 's executable which is under the root directory of swig
On the SWIG site, you can download for example the swigwin-2.0.7 zip directory for windows's swig. unzip it in a directory of your choice for example on "C:\Program Files" directory if you want. After this, you have the swig executable in the "C:\Program Files\swigwin-2.0.7" directory: "C\Program Files\swigwin-2.0.7\swig"
you have to set now the environment variable "path" to point to this swig exec: add for this the "C:\Program Files\swigwin-2.0.7" path to the "path"variable according to my example; that is all you need to use swig on windows. You can now play with swig so, open a prompt "cmd" and just type "swig --help" on this prompt you can see a list of the differents options you can use with swig.
If you d'ont have visual c++, you can use for example codeblock, that is my case so the link below could be a help for you : http://wiki.codeblocks.org/index.phptitle=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system
The page http://www.swig.org/download.html has a specific download for Windows with a pre-built version of swig.exe. You can download it and avoid the hassle of compiling swig by yourself.
If you really need to, you can consult the file Doc/Manual/Windows.html that contain Windows-specific instructions to build SWIG.
Finally, to answer your specific question, the syntax
./configure
is a UNIX-style command that means 'execute the program named configure in the current directory' (the dot)
On Windows, you would type
.\configure
or even simpler, as all files are executable on Windows, only
configure
... BUT this will not work as the said 'configure' script is a bash script that will not run in a Windows shell.
Download Miniconda.
Then follow this guide and do: conda install -c anaconda swig

Resources