Ansible install RethinkDB on ubuntu 16 - package

I am trying to use ansible package to install a specific version of RethinkDB on ubuntu 16.04.
I use :
- name: Ensure rethinkDB package repository is present
apt_repository: repo='deb http://download.rethinkdb.com/apt xenial main' state=present
tags:
- rethinkdb
- name: install RethinkDB
package: name=rethinkdb-2.3.2 state=latest
tags:
- rethinkdb
However I get the following error:
TASK [install RethinkDB]
******************************************************* task path: /Users/nha/.../playbook.yml:173 fatal:
[machine]: FAILED! => {"changed": false, "failed": true, "msg": "No
package matching 'rethinkdb-2.3.2' is available"} to retry, use:
--limit #ops/ansible/playbook.retry
Even leaving out the version, I get the error:
TASK [install RethinkDB]
******************************************************* task path: /Users/nha/.../playbook.yml:173 fatal:
[machine]: FAILED! => {"cache_update_time": 0, "cache_updated": false,
"changed": false, "failed": true, "msg": "'/usr/bin/apt-get -y -o
\"Dpkg::Options::=--force-confdef\" -o
\"Dpkg::Options::=--force-confold\" install 'rethinkdb'' failed:
E: There were unauthenticated packages and -y was used without
--allow-unauthenticated\n", "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stdout":
"Reading package lists...\nBuilding dependency tree...\nReading state
information...\nThe following additional packages will be installed:\n
libcurl3\nThe following NEW packages will be installed:\n libcurl3
rethinkdb\n0 upgraded, 2 newly installed, 0 to remove and 0 not
upgraded.\nNeed to get 11.2 MB of archives.\nAfter this operation,
40.2 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n rethinkdb\n", "stdout_lines":
["Reading package lists...", "Building dependency tree...", "Reading
state information...", "The following additional packages will be
installed:", " libcurl3", "The following NEW packages will be
installed:", " libcurl3 rethinkdb", "0 upgraded, 2 newly installed, 0
to remove and 0 not upgraded.", "Need to get 11.2 MB of archives.",
"After this operation, 40.2 MB of additional disk space will be
used.", "WARNING: The following packages cannot be authenticated!", "
rethinkdb"]} to retry, use: --limit #ops/ansible/playbook.retry

The first error message states that the RethinkDB apt repo doesn't contain a package for a 2.3.2 version.
The second error is because you haven't yet added the apt key to trust this repo. RethinkDB's Ubuntu installation instructions also mentions that you will need to add their apt key.
You can easily do this with the apt_key module:
- name: add rethinkdb apt key
apt_key: url=https://download.rethinkdb.com/apt/pubkey.gpg
As an aside, it doesn't really make much sense to specify a version and then also specify latest on the state.

Related

Invalid formula: /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/buck.rb

I ran the brew command to install Facebook homebrew tap. I have a M1 Apple Silicon Chipset and use a terminal under Rosetta for brew commands.
brew tap facebook/fb
I got the error message:
==> Tapping facebook/fb
Cloning into '/usr/local/Homebrew/Library/Taps/facebook/homebrew-fb'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 333 (delta 27), reused 24 (delta 13), pack-reused 287
Receiving objects: 100% (333/333), 5.44 MiB | 9.18 MiB/s, done.
Resolving deltas: 100% (179/179), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/buck.rb
buck: Calling depends_on :java is disabled! Use "depends_on "openjdk#11", "depends_on "openjdk#8" or "depends_on "openjdk" instead.
Please report this issue to the facebook/fb tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/buck.rb:19
Warning: Calling depends_on :osxfuse is deprecated! There is no replacement.
Please report this issue to the facebook/fb tap (not Homebrew/brew or Homebrew/core):
/usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/xar.rb:8
Error: Cannot tap facebook/fb: invalid syntax in tap!
I searched for the facebook/fb tap on Google, I found a GitHib repo but reporting errors is unactivated: https://github.com/facebook/homebrew-fb
The simplest solution you can do is fork the Facebook/FB repository into your GitHub account then change the 19th line in buck.rb file. It should be like this:
old one: depends_on java: "1.8"
new one: depends_on "openjdk#8"
The reason we do this Buck still relies on Java 8.
After you do this you can simply open your terminal and write:
brew tap {yourGithubAccountName}/homebrew-fb
then
brew install buck

Cannot install tmap

When I try to install tmap:
install.packages("tmap")
I have the following mistake:
also installing the dependencies ‘tmaptools’, ‘sf’
There are binary versions available but the source versions are later:
binary source needs_compilation
sf 0.9-0 0.9-2 TRUE
tmap 2.3-2 3.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tmaptools_3.0.zip'
Content type 'application/zip' length 178880 bytes (174 KB)
downloaded 174 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/sf_0.9-0.zip'
Content type 'application/zip' length 39675549 bytes (37.8 MB)
downloaded 37.8 MB
package ‘tmaptools’ successfully unpacked and MD5 sums checked
package ‘sf’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Marine\AppData\Local\Temp\RtmpSQF9EP\downloaded_packages
installing the source package ‘tmap’
trying URL 'https://cran.rstudio.com/src/contrib/tmap_3.0.tar.gz'
Content type 'application/x-gzip' length 2936348 bytes (2.8 MB)
downloaded 2.8 MB
* installing *source* package 'tmap' ...
** package 'tmap' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'sf' 0.9-0 is being loaded, but = 0.9.1 is required
Calls: <Anonymous ... withCallingHandlers - loadNamespace - namespaceImport - loadNamespace
Exécution arrêtée
ERROR: lazy loading failed for package 'tmap'
* removing 'C:/Program Files/R/R-3.6.3/library/tmap'
Warning in install.packages :
installation of package ‘tmap’ had non-zero exit status
So I guess this is a problem with the sf version, but when I try to install sf independently, it is the version 0.9-0. that I install, and I cannot install 0.9.1 or more as required.
Any tip to overcome this issue?
Thanks!
PS: I use R version 3.6.3

libuuid not linking in ubuntu 16.04

The above problem is not resolved in ubuntu 16.04 .
I tried it but still not working . here are the results of steps I followed :
~$ apt-cache search libuuid
libuuid-perl - Perl extension for using UUID interfaces as defined in e2fsprogs libuuid1 - Universally Unique ID library uuid-dev - Universally Unique ID library - headers and static libraries uuid-runtime - runtime components for the Universally Unique ID library libdata-uuid-libuuid-perl - uuid.h based UUID generation module libuuid-tiny-perl - pure Perl module to generate v1, v3, v4, and v5 UUIDs libuuidm-ocaml-dev - Universally unique identifiers for OCaml php-uuid - PHP UUID extension
~$ sudo apt-get install uuid-runtime
Reading package lists... Done Building dependency tree
Reading state information... Done uuid-runtime is already the newest version (2.27.1-6ubuntu3.6). The following packages were automatically installed and are no longer required: linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic linux-image-4.15.0-29-generic linux-image-4.15.0-43-generic linux-modules-4.15.0-29-generic linux-modules-4.15.0-43-generic linux-modules-extra-4.15.0-29-generic linux-modules-extra-4.15.0-43-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 77 not upgraded.
~$ sudo apt-get install libuuid1
Reading package lists... Done Building dependency tree
Reading state information... Done libuuid1 is already the newest version (2.27.1-6ubuntu3.6). The following packages were automatically installed and are no longer required: linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic linux-image-4.15.0-29-generic linux-image-4.15.0-43-generic linux-modules-4.15.0-29-generic linux-modules-4.15.0-43-generic linux-modules-extra-4.15.0-29-generic linux-modules-extra-4.15.0-43-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 77 not upgraded.
~$ sudo apt-get install uuid-dev
Reading package lists... Done Building dependency tree
Reading state information... Done uuid-dev is already the newest version (2.27.1-6ubuntu3.6). The following packages were automatically installed and are no longer required: linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic linux-image-4.15.0-29-generic linux-image-4.15.0-43-generic linux-modules-4.15.0-29-generic linux-modules-4.15.0-43-generic linux-modules-extra-4.15.0-29-generic linux-modules-extra-4.15.0-43-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 77 not upgraded.
Following is the code in my test.c file
#include <stdio.h>
#include <uuid/uuid.h>
int get_uuid();
int main()
{
get_uuid();
return 1;
}
int get_uuid()
{
uuid_t uuid;
uuid_generate(uuid);
return 1;
}
Error: /tmp/cchyLkZt.o: In function get_uuid':
test5.c:(.text+0x34): undefined reference touuid_generate' collect2: error: ld returned 1 exit status
Compilation Command -
cc -luuid test.c

XLConnect, rJava and package building

I am writing a function that i want to include in a user-defined package (MYPACKAGE). The function is a follows:
readSchedule <- function(FILE){
WB = loadWorkbook(FILE)
WS= readWorksheet(WB, sheet = 'Sheet1',header = TRUE)
return(WS)
}
where FILE is the name of the Excel file i want to read. When writing this function, I want it to import XLConnect, since that is the package it uses. I placed header code defining the function:
#param FILE Excel file
#return Excel data
#export
#import XLConnect
I have also added import(XLConnect) to the NAMESPACE and the DESCRIPTION file of MYPACKAGE. The package builds fine (or at least at first cut it appears to build OK) but when i run "Check Package" it fails and gives me the following error:
* installing *source* package 'MYPACKAGE' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
I have the correct version of Java and can load rJava just fine. i've tried importing rJava (similar to XLConnect) but i get the same error. Below is my sessionInfo:
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MYPACKAGE
loaded via a namespace (and not attached):
[1] chron_2.3-45 data.table_1.9.4 digest_0.6.8 lubridate_1.3.3 memoise_0.2.1 plyr_1.8.1
[7] Rcpp_0.11.1 reshape2_1.4 rJava_0.9-6 stringr_0.6.2 tools_3.1.2 XLConnect_0.2-7
It looks like you are building your package on a Windows 64-bit machine with a 64-bit version of Java installed. When checking your package using R CMD check, R by default also attempts to check your package on other sub-architectures (i386, 32-bit) which in your case would in addition require a 32-bit installation of Java.
If you want to check your package also for i386 you may just additionally install Java 32-bit. The other option is to pass the option --no-multiarch to your R CMD check call, e.g. R CMD check --no-multiarch MYPACKAGE.

Problems with mod_auth_token installation

TOOLS
apache2 -v : Server version: Apache/2.4.7 (Ubuntu)
ubuntu 14.04 LTS
I'd like to install mod_auth_token to secure some of my files but I'm having problems with the first command I need to run:
Command
./configure
Error message
configure: error: APXS not found in $PATH, please use with-apxs to specify the location of the apxs binary
Except that locate apxs returns none so I guess it's nowhere and
echo $PATH -> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Any ideas ?
UPDATE1
Found it, apxs2 was missing, to add it apt-get install apache2-dev
But now when I run make or make check or make install I get a warning and the installation stops:
mod_auth_token.c:65:3: warning: missing sentinel in funcgtion call [ -Wformat=]
ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/'));
^
Code
if (arg[len -1] != '/') {
/*here*/ ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/'));
conf->prefix_len = len + 1;
....
I was having this issue and developer here figured this for me (thanks Bill!).
According to Apache Docs https://apr.apache.org/docs/apr/1.6/group__apr__strings.html#ga7bd80c95ffb7b3f96bc78e7b5b5b0045 "The final string must be NULL"
He changed that line to:
ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/', NULL));
and it compiled.

Resources