Install latest android support library CLI - android-sdk-manager

I am trying to use ContextCompat class from the Android Support Library. I am using only CLI tools to build an app. So I figured I have to get a jar. I entered the following:
$ sdkmanager --list | grep extras
Warning: File /root/.android/repositories.cfg could not be loaded.
extras;android;m2repository | 47.0.0 | Android Support Repository | extras/android/m2repository/
extras;android;gapid;1 | 1.0.3 | GPU Debugging tools
extras;android;gapid;3 | 3.1.0 | GPU Debugging tools
extras;android;m2repository | 47.0.0 | Android Support Repository
$ sdkmanager "extras;android;m2repository"
$ ls /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/*
-rw-r--r-- 1 root root 1767 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1.aar
-rw-r--r-- 1 root root 32 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1.aar.md5
-rw-r--r-- 1 root root 40 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1.aar.sha1
-rw-r--r-- 1 root root 1572 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1.pom
-rw-r--r-- 1 root root 32 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1.pom.md5
-rw-r--r-- 1 root root 40 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1.pom.sha1
-rw-r--r-- 1 root root 261 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1-sources.jar
-rw-r--r-- 1 root root 32 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1-sources.jar.md5
-rw-r--r-- 1 root root 40 Sep 12 16:16 /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0-alpha1/support-v4-26.0.0-alpha1-sources.jar.sha1
The problem is, I cannot see any jar files of the latest Android Support Library. What should I do to download it?

The folder /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/24.1.1 in my case contained about 2MB aar file, which contained classes.jar file, which I finally and ended up using. It is unclear what is the purpose of other low-size files in the other folders like 26.0.0.

Related

CentOs 7, "Tesseract couldn't load any languages!" however: "List of available languages (2): eng, spa"

this is CentOs 7
when I run tesseract --list-langs
[root#cia tessdata]# tesseract --list-langs
Error opening data file /usr/local/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
List of available languages (2):
eng
spa
[root#cia tessdata]#
however when I run
[root#cia tessdata]# ls -l /usr/local/share/tessdata/
total 328
drwxr-xr-x. 2 root root 4096 Nov 17 23:28 configs
-rw-r--r--. 1 root root 164228 Nov 18 06:11 eng.traineddata
-rw-r--r--. 1 root root 572 Nov 17 23:28 pdf.ttf
-rw-r--r--. 1 root root 157745 Nov 18 06:11 spa.traineddata
drwxr-xr-x. 2 root root 98 Nov 17 23:28 tessconfigs
[root#cia tessdata]#
I get eng.traineddata and spa.traineddata in this form:
cd /usr/local/share/tessdata
wget https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/blob/main/spa.traineddata
:::::::::::::::::::::::::::::::::::::::::::
allways I install languages with:
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/master/spa.traineddata
then allways tesseract work fine, but now this return 404
how I can fix?

buildroot: No rootfs in rootfs.iso9660 image file

I am trying to build my own USB Bootable Linux.
As far as I have understood the buildroot documentation, buildroot should give me ready-for-use images.
My output folder contains the following images:
build#build:~/buildroot_usb/output/images$ ls * -lh
-rw-r--r-- 1 root root 45M Sep 19 18:26 bzImage
-rw-r--r-- 1 root root 102M Sep 19 18:25 rootfs.cpio
-rw-r--r-- 1 root root 512M Sep 19 18:25 rootfs.ext2
lrwxrwxrwx 1 root root 11 Sep 19 18:25 rootfs.ext4 -> rootfs.ext2
-rw-r--r-- 1 root root 46M Sep 19 18:26 rootfs.iso9660
-rw-r--r-- 1 root root 111M Sep 19 18:26 rootfs.tar
-rw-r--r-- 1 root root 37M Sep 19 18:26 rootfs.tar.gz
syslinux:
insgesamt 164K
-rwxr-xr-x 1 root root 36K Sep 19 17:42 isolinux.bin
-rwxr-xr-x 1 root root 440 Sep 19 17:42 mbr.bin
-rwxr-xr-x 1 root root 124K Sep 19 17:42 syslinux.efi
build#build:~/buildroot_usb/output/images$
The rootfs.iso9600 image should be a Bootable ISO image. But the size of the file shows that the whole root file system is missing. it's only the kernel and the bootloader inside. (i checked that).
Config:
You have enabled to have the root filesystem as an initramfs inside the kernel image, so it gets compressed. If you look at your bzImage file (the kernel image), it's 45 MB, so it's definitely the kernel + the compressed root filesystem. Your ISO image is 46 MB, so it's basically just the kernel image + the bootloader, so it's all good.
Compare that to the size of the compressed rootfs tarball (rootfs.tar.gz), which is 37 MB in size. It all matches pretty well.
So, your 46 MB ISO image definitely contains the root filesystem, compressed as an initramfs inside the kernel image.

Command 'scala' not found on Ubuntu 18.04

I downloaded scala,unpacked it and copied to /usr/local/share
After that,I edited ~/.bashrc
export SCALA_HOME=/usr/local/share/scala-2.12.8
export PATH=$PATH:$SCALA_HOME/bin
Anyway,it does not work.
scala -version
Command 'scala' not found, but can be installed with:
sudo apt install scala
I could go for apt install but I don't get it what is wrong.
/usr/local/share$ ll
total 48
drwxr-xr-x 12 root root 4096 јул 1 06:03 ./
drwxr-xr-x 14 root root 4096 јун 23 18:04 ../
drwxr-xr-x 2 root root 4096 апр 21 08:04 appdata/
drwxr-xr-x 2 root root 4096 јун 25 21:03 applications/
drwxr-xr-x 2 root root 4096 јул 25 2018 ca-certificates/
drwxrwsr-x 3 root staff 4096 јул 25 2018 emacs/
drwxrwsr-x 2 root staff 4096 јул 25 2018 fonts/
drwxr-xr-x 3 root root 4096 апр 19 08:44 lua/
drwxr-xr-x 2 root root 4096 јул 25 2018 man/
drwxrwxr-x 6 miki miki 4096 дец 4 2018 scala-2.12.8/
drwxrwsr-x 7 root staff 4096 мај 14 15:05 sgml/
drwxrwsr-x 6 root staff 4096 мај 14 15:05 xml/
Editing .bashrc won't affect an already open shell. You could explicitly source it (source ~/.bashrc) to have it take effect, or open a new shell to reload it.

custom yum repo not showing rpm

I have a yum repository I've set up where I store custom rpms.
I have no problem finding information about other packages that were built and stored in this custom repo.
#yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug
php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k
No problem.
Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results.
I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir).
[root#reposerver mnt]# ls -l /var/www/repo/
total 12
-rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README
drwxr-xr-x 3 root root 4096 Jun 10 2011 centos
drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/
SRPMS/ i386/ noarch/ repodata/ x86_64/
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/
total 7324
-rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm
drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata
-rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm
-rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm
I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless.
# cat /etc/yum.repos.d/mycompany.repo
[mycompany]
name=mycompany custom repo
baseurl=http://config/repo/centos/5/$basearch
enabled=1
exactarch=0
I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms.
repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion
returns results as well, so it's definitely in the repo data.
yum clean all on the server I was trying to install on worked.
Also make sure to do createrepo --update on the specific subdir instead of the root of the repo.

Build failed when installing node-postgres module for node.js

I'm very (very) new to node.js, and also fairly green when it comes to server side configuration and coding. (I have a long history of client-side programming, most recently with Adobe Flex and ActionScript.)
Anyhow, I asked Rackspace (who manages a Linux server for me) to install node.js and node-postgres.
From the comments in the ticket, that installation went like this:
node.js
Running Transaction
Installing : nodejs-stable-release [1/1]
Installed: nodejs-stable-release.noarch 0:5-3
Complete!
and node-postgres
[root#237175-web2 src]# npm install pg
npm http GET https://registry.npmjs.org/pg
npm http 200 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/pg/-/pg-0.6.17.tgz
npm http GET https://registry.npmjs.org/generic-pool/1.0.9
npm http 200 https://registry.npmjs.org/generic-pool/1.0.9
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-1.0.9.tgz
pg#0.6.17 install /usr/src/node_modules/pg
node-waf configure build || (exit 0)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.051s)
Waf: Entering directory `/usr/src/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
[2/2] cxx_link: build/Release/src/binding_1.o -> build/Release/binding.node
Waf: Leaving directory `/usr/src/node_modules/pg/build'
'build' finished successfully (0.745s)
pg#0.6.17 ./node_modules/pg
+-- generic-pool#1.0.9
More info:
[root#237175-web2 ~]# ls -la /usr/src/node_modules/pg
total 68
drwxr-xr-x 9 root root 4096 Apr 26 22:34 .
drwxr-xr-x 3 root root 4096 Apr 26 22:34 ..
drwxr-xr-x 2 root root 4096 Apr 26 22:34 benchmark
drwxr-xr-x 4 root root 4096 Apr 26 22:34 build
drwxr-xr-x 3 root root 4096 Apr 26 22:34 lib
-rw-r--r-- 1 root root 5618 Apr 26 22:34 .lock-wscript
-rw-r--r-- 1 root root 1269 Feb 23 23:58 Makefile
drwxr-xr-x 3 root root 4096 Apr 26 22:34 node_modules
-rw-r--r-- 1 root root 21 Mar 3 15:19 .npmignore
-rw-r--r-- 1 root root 962 Apr 26 22:34 package.json
-rw-r--r-- 1 root root 6843 Mar 27 09:30 README.md
drwxr-xr-x 2 root root 4096 Apr 26 22:34 script
drwxr-xr-x 2 root root 4096 Mar 21 23:37 src
drwxr-xr-x 5 root root 4096 Apr 26 22:34 test
-rw-r--r-- 1 root root 990 Feb 23 23:58 wscript
[root#237175-web2 ~]#
A little “Hello world” node.js example works fine (hooray!), but a simple Postgres example fails on the require('pg') statement, saying that the module cannot be found. I've looked on the server and can't find a pg.js file anywhere.
Any clue as to why the node-postgres build failed?
Install it globally:
npm install -g pg
You may need to become root, e.g. with
sudo npm install -g pg