The question is simple.
I want to download a package (mingw-w64-x86_64-libshout) with all the dependencies on it recursively (dependencies of dependencies of ...).
I don't want to install the package in msys2 posix platform. Just to download it.
Using quasi-msys2 (which I'm the author of):
git clone https://github.com/holyblackcat/quasi-msys2
cd quasi-msys2
make get-deps mingw-w64-x86_64-gcc | xargs make cache-download
Where mingw-w64-x86_64-gcc is the package name.
The packages are downloaded to ./cache.
Caveat: it only supports packages prefixed with mingw-??-, not the ones from the MSYS environment. By default the MINGW64 environment is used (which owns the packages prefixed with mingw-w64-x86_64-, which is what you need), but it can be changed using e.g. echo UCRT64 >msystem.txt after cloning the repo.
It doesn't use pacman, and will work on other operating systems without MSYS2 installed.
I've freshly installed Ubuntu 18.04 and have decided to try Anaconda. However, when I then try to install Mendeley, I get the following error:
mendeleydesktop depends on python; however:
Package python is not installed.
I assume the issue here is that python is now in ~\anaconda2\bin, instead of \usr\bin. I'm not certain what I should do. As I see it, I have 3 options:
Install a system python into \usr\bin, but this seems sloppy/messy
Put a softlink in \usr\bin along the lines of ln -s python ~\anaconda2\bin\python, but I'm worried that there might be implications to that, which I don't understand
Somehow tell the mendeley.deb file where the python I'm using is, but I don't know how to do this.
Are either 1 or 2 reasonable options? If not how do I implement my 3rd option, or what else should I do?
Empirically found option 2 does not work. dpkg is still looking for the installation of the python package
You can use the method given here to remove the system python dependency in the .deb file; I tried this and mendeley seems to install as normal. Assuming your conda environment is set up correctly, it will work. I had to modify the instructions on that page slightly:
Unpack deb: $ ar x mendeleydesktop_1.19.4-stable_amd64.deb (will create i.e. three files: debian-binary control.tar.gz data.tar.gz)
Unpack control archive: $ tar xzf control.tar.gz (will create: postinst control)
Fix dependencies in control (use a text editor)
Repack control.tar.gz: $ tar c postinst control | gzip -c > control.tar.gz
Repack deb: $ ar rcs mendeleydesktop_1.19.4-stable_amd64_nopythondep.deb debian-binary control.tar.gz data.tar.gz (order important! dpkg wouldn't be able to read the metadata of a package quickly if it had to search for where the data section ended!)
I'm trying to download debugging symbols to Debian OS, I've done some research and saw this web : https://wiki.debian.org/HowToGetABacktrace , but i could not know the name of the package to download it. Please help me.
This depends on what app you want to debug. Say you want to debug /bin/ls.
First you need to find out what package provides this file:
$ dpkg -S /bin/ls
coreutils: /bin/ls
Package name is coreutils. Next you need to install debug symbols for this package following instructions in https://wiki.debian.org/HowToGetABacktrace#Installing_the_debugging_symbols. It should be either coreutils-dbgsym or coreutils-dbg package. So the command to install debug symbols package would be one of these:
# apt-get install coreutils-dbgsym
or
# apt-get install coreutils-dbg
As part of a salt state file I am installing nghttp2.
So far I have the following code in my .sls
install_nghttp2:
cmd.run:
- name: |
cd /tmp
wget https://github.com/nghttp2/nghttp2/releases/download/v1.16.0/nghttp2-1.16.0.tar.gz
tar -xf nghttp2-1.16.0.tar.gz
cd ./nghttp2-1.16.0
./configure
make
make install
- shell: /bin/bash
- require:
- pkg: install_nghttp2_deps
- unless: test -x /tmp/nghttp2-1.16.0
I'm a little wary of the - unless requisite and was wondering if anyone had a better way to check nghttp2 hasn't already been installed? I'd rather do something to check it hasn't been installed rather than just check whether it's been downloaded - unless (pun intended...kinda) anyone has a better suggestion?
Since you compile specific version and you do not install it with package manager, I think you are doing it right.
Maybe better option to check if the program is installed would be to use different command in unless requisite.
For example you can use nghttpd --version or with full path, where the binary is stored /usr/sbin/nghttpd --version.
Other good option is to use which nghttpd.
A friend sent me along this great tutorial on webscraping The New York Times with R. I would really love to try it. However, the first step is to install a package called [RJSONIO][2] from source.
I know R reasonably well, but I have no idea how to install a package from source.
I'm running macOS (OS X).
If you have the file locally, then use install.packages() and set the repos=NULL:
install.packages(path_to_file, repos = NULL, type="source")
Where path_to_file would represent the full path and file name:
On Windows it will look something like this: "C:\\RJSONIO_0.2-3.tar.gz".
On UNIX it will look like this: "/home/blah/RJSONIO_0.2-3.tar.gz".
Download the source package, open Terminal.app, navigate to the directory where you currently have the file, and then execute:
R CMD INSTALL RJSONIO_0.2-3.tar.gz
Do note that this will only succeed when either: a) the package does not need compilation or b) the needed system tools for compilation are present. See: R for Mac OS X
You can install directly from the repository (note the type="source"):
install.packages("RJSONIO", repos = "http://www.omegahat.org/R", type="source")
A supplementarily handy (but trivial) tip for installing older version of packages from source.
First, if you call "install.packages", it always installs the latest package from repo. If you want to install the older version of packages, say for compatibility, you can call install.packages("url_to_source", repo=NULL, type="source"). For example:
install.packages("http://cran.r-project.org/src/contrib/Archive/RNetLogo/RNetLogo_0.9-6.tar.gz", repo=NULL, type="source")
Without manually downloading packages to the local disk and switching to the command line or installing from local disk, I found it is very convenient and simplify the call (one-step).
Plus: you can use this trick with devtools library's dev_mode, in order to manage different versions of packages:
Reference: doc devtools
From CRAN, you can install directly from a GitHub repository address. So if you want the package at https://github.com/twitter/AnomalyDetection, using
library(devtools)
install_github("twitter/AnomalyDetection")
does the trick.
In addition, you can build the binary package using the --binary option.
R CMD build --binary RJSONIO_0.2-3.tar.gz
If you have source code you wrote yourself, downloaded (cloned) from GitHub, or otherwise copied or moved to your computer from some other source, a nice simple way to install the package/library is:
In R
It's as simple as:
# install.packages("devtools")
devtools::install('path/to/package')
From terminal
From here, you can clone a GitHub repo and install it with:
git clone https://github.com/user/repo.git
R -e "install.packages('devtools');devtools::install('path/to/package')"
Or if you already have devtools installed, you can skip that first bit and just clone the repo and run:
R -e "devtools::install('path/to/package')"
Note that if you're on ubuntu, install these system libraries before installing devtools (or devtools won't install properly).
apt-get update
apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev -y