Error installing JQ on windows - jq

I have been trying to install jq using chocoletey
However, when I run the following command, it fails.
choco install jq
Reading the log file, I see that it is pointing the Powershell script is pointing at a ULR that doesn't exist any more
Attempt to get headers for
http://stedolan.github.io/jq/download/win64/jq.exe failed.
I tried update the powershell script but choco install still not working for me. Can anyone help me out please.

Resolved it after reading details from the following pull-request.
https://github.com/stedolan/jq/issues/959
The solution is to pass -version 1.5 to the install command. The following works just fine.
choco install jq --force -version 1.5

During the moderation process, even if there is a newer version of the application hosted on chocolatey.org, doing choco install <package name> will only give you the latest moderated package.
However, if you are willing to accept the potential for a problematic package, you can always force the installation of an unmoderated package by specifying the version number in the install command, as you have done.
In this case, the unmoderated package actually fixed an issue with the moderated one, so it was safe to proceed with, but just take care when doing this, and only do it on a case by case basis, in the knowledge that an unmoderated package may actually change, based on comments which are raised during the moderation process.

Related

How to use R libraries in Azure Databricks without depending on CRAN server connectivity?

We are using a few R libraries in Azure Databricks which do not come preinstalled. To install these libraries during Job Runs on Job Clusters, we use an init script to install them.
sudo R --vanilla -e 'install.packages("package_name",
repos="https://mran.microsoft.com/snapsot/YYYY-MM-DD")'
During one of our production runs, the Microsoft Server was down (could the timing be any worse?) and the job failed.
As a workaround, we now install libraries in /dbfs/folder_x and when we want to use them, we include the following block in our R code:
.libpaths('/dbfs/folder_x')
library("libraryName")
This does work for us, but what is the ideal solution to this? Since, if we want to update a library to another version, remove a library or add one, we have to go through the following steps everytime and there is a chance of forgetting this during code promotions:
install.packages("xyz")
system("cp -R /databricks/spark/R/lib/xyz /dbfs/folder_x/xyz")
It is a very simple and workable solution, but not ideal.

Cannot configure rgee R package properly with ee_install()

I've searched for tutorials to help configure the package in my PC, and I've found this one: https://www.youtube.com/watch?v=_fDhRL_LBdQ
I executed every part of the code interactively with the tutorial, but when I run ee_install() (after installing miniconda with py_discover_config() and other packages previously, such as reticulate), but it keeps me returning an error saying that anaconda is mandatory for the package since I'm a windows user.
Here is the error I get:
Error in ee_install_set_pyenv_env(py_env = py_env, py_path = python_path, : Windows users must install miniconda/anaconda to use rgee. The use of a Python environment is mandatory.
I've just installed Anaconda (full version with navigator) and I set a new python environment called "py2r" and tried to use the function ee_install_set_pyenv(), passing the path to the environment created through Anaconda Navigator (which has a python.exe) as paremeter to py_path and the name "py2r" as paremeter for py_env arg. And yet, it didn't work.
What am I missing?
In case you want to take a look at the code, I can provide it, but I don't think it's necessary because is a simple test script that follows as I described.
Thanks for your attention and congratulations for the library, it will be very usefull for me at work!
I fixed the ee_install() problems bypassing them and doing every passage manually. It will require no more then 10 mins and you will probably fix the installation problems. You can find and follow the manual installation with this tutorial:
https://www.youtube.com/watch?v=1-k6wNL2hlo

How to change the post-installation script of a package and re-install it?

I am trying to install gnocchi-api, gnocchi-metricd and python-gnocchiclient with apt-get. I found that the postinst scripts in /var/lib/dpkg/info have some misconfigured ports due to which I cannot install the packages successfully. I wanted to ask if there is a way to change the post-installation scripts nad then re-install the package.
Thanks.
Ideally this kind of problems would be solved by filing a bug report (possibly with a patch) and letting the maintainer upload a fixed version that you can upgrade to.
If you need an immediate local workaround though, you could do the following:
Either apt download <package> or dpkg-repack <package> if for example this is a local package only, or the archive does not contain the version you are interested in f.ex.
dpkg-deb -R <package_version_arch>.deb bin-dir
sensible-editor bin-dir/DEBIAN/postinst
sensible-editor bin-dir/DEBIAN/control ideally to bump the version to mark this as a local modification, say by appending +local1 or similar.
dpkg-deb -b bin-dir .
dpkg -i <package_local-version_arch>.deb

R-Install and run multiple R versions on Mac

I'm trying to install two different R versions (R-3.0.0 and R-3.2.1) on a Mac OSX 10.7 (Lion).
I first installed R-3.0.0 and then as suggested here, I ran the command:
sudo pkgutil --forget R-3.0.0.pkg
But I'm getting the following error message:
No receipt for 'R-3.0.0.pkg' found at '/'.
Does anyone know where to find this receipt so that I can install R-3.2.1 and run Rswitch correctly?
You need to specify the package name with pkgutil --forget, not the installation package filename.
R installation and administration contains a summary of what’s necessary to parallel install multiple versions of R.
In particular, there are multiple packages associated with the R installation. Since these are subject to change I won’t list them here. Instead, you can find them yourself by running
pkgutil --pkgs | grep -i org.r-project
(The -i flag is important since some packages start with org.r-project, while others start with org.R-. The linked documentation currently fails to mention this!)
All of these need to be forgot. This is fairly straightforward; for instance, the following will work:
pkgutil --pkgs | grep -i org.r-project | xargs -I {} sudo pkgutil --forget {}
After that, you can manually install another version of R by runnings its pkg installer.
[Though this question is quite old, google search still leads here]
With R.3.1.0 installed and attempting to run R.3.3.0 in parallel, I received the same message
pkgutil --forget org.r-project.R.mavericks.fw.pkg
No receipt for 'org.r-project.R.mavericks.fw.pkg' found at '/'.
Here onwards, I continued installation of R.3.3.0 and it all works like a dream. Previous packages of R.3.1.0 are functional and not affected.
Use RSwitch from bob rudis. It works on versions of MacOS beyond 10.14, and has additional features, like help and update checking
https://rud.is/rswitch/
I use the sudo pkgutil --forget R-3.0.0.pkg, but I run that first, before installing the newer version of R. From your question, it sounds like you are running it after the install.
From the package installer: "Note: By default the installer upgrades previous Mavericks build of R if present. If you want to keep the previous version, use
pkgutil --forget org.r-project.R.mavericks.fw.pkg"
That order of operations works for me. Give it a try and then see if Rswitch works for you?

Does guile have a package manager?

I'd like to discover the guile ecosystem. I looked at how to install a library and I didn't find a package manager, like python's pip. Does such a thing exist for guile ?
Looks like guildhall is the closest thing to pip out there. There has been some discussion on the Guile mailing lists recently around it. The posts by Wingo, Boubekki, Zaretskii, and a few others who are heavily involved with Guile development indicate a push towards making guildhall an upstream source for something called Guix that is a more general package manager intended to be independent of platform.
If you consult the Guix list of packages you will see guile there and a number of other guile related items (e.g. guile-json, guile-ncurses, etc..). I'd give that a shot. Otherwise you're on your own and you'll have to either fall back to the OS package manager or pull down the source yourself, build, and install.
Full disclosure: I haven't tried Guix myself but I've been meaning to. I'd be very interested to see how it turns out for you so if you do go this route it'd be awesome if you could provide an update with your Guix experience.
There's also been a recent call to update the libraries page and from a quick inspection there's been some small number of updates that you may find useful.
#unclejamil This is an update of my attempt to install the guix package manager.
Documentation
First of all, the links:
the official page: https://www.gnu.org/software/guix/
the download page: http://alpha.gnu.org/gnu/guix/ (guix-the-system and guix the package manager are listed together)
Installation (Debian)
Guix needs Guile-2.0-dev and more dependencies, which are present in Debian's repositories:
apt-get install guile-2.0-dev guile-2.0 libgcrypt20-dev libbz2-dev libsqlite3-dev autopoint
Download guix. See the above links to download a binary. Or get the sources:
git clone git://git.savannah.gnu.org/guix.git
The installation goes with a classical ./configure && make && make install.
make will take several minutes and make install needs root access. If you install from source, make will build guile objects of the 346 base packages (python, zsh, abiword,…) so it'll take a long time (the database is included into guix-the-program, so we must do that. You can still tweak this list in the Makefile, at MODULES) .
Note: Your current directory must not contain non ascii characters.
Note: see also this complete tutorial, with the focus on how to install guix locally, i.e. not to run make install: http://dustycloud.org/blog/guix-package-manager-without-make-install/
Usage
To install packages with guix, we need a running server.
The first method, for testing purposes, is simply to run the server in a terminal:
sudo guix-daemon
and the client in another one:
guix package -s "guile.*curses" # search with regexps
sudo guix package -i guile-ncurses # install. All start with the "package" command.
For the proper method, see https://www.gnu.org/software/guix/manual/html_node/Build-Environment-Setup.html#Build-Environment-Setup
To be continued.
This answer is a community wiki, feel free to complete it, thanks !
I am building Guix right now and encountered the same error about not finding guile-2.0. I managed to fix it by installing the development files for guile-2.0
sudo apt-get install guile-2.0-dev
I encountered some more errors later on and it just meant I needed to install the development files for it.

Resources