sdkmanager install package build-tools on debian 11 - android-sdk-manager

Trying to install build-tools;30.0.03 in debian:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
$ sdkmanager --install "build-tools;30.0.3" --sdk_root=$ANDROID_SDK_ROOT --verbose
Info: Parsing /opt/android-sdk/build-tools/30.0.2/package.xml
Info: Parsing /opt/android-sdk/build-tools/31.0.0/package.xml
Info: Parsing legacy package: /opt/android-sdk/cmdline-tools/7583922
Info: Parsing /opt/android-sdk/emulator/package.xml
Info: Parsing /opt/android-sdk/extras/android/m2repository/package.xml
Info: Parsing /opt/android-sdk/extras/google/m2repository/package.xml
Info: Parsing /opt/android-sdk/patcher/v4/package.xml
Info: Parsing /opt/android-sdk/platform-tools/package.xml
Info: Parsing /opt/android-sdk/platforms/android-30/package.xml
Info: Parsing /opt/android-sdk/platforms/android-31/package.xml
Info: Parsing /opt/android-sdk/system-images/android-30/default/x86_64/package.xml
Info: Parsing /opt/android-sdk/system-images/android-30/google_apis/x86/package.xml
Info: Parsing /opt/android-sdk/system-images/android-31/default/x86_64/package.xml
Info: Parsing /opt/android-sdk/tools/package.xml
Info: Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)".
Warning: Failed to read or create install properties file.
But the package is not installed:
$ sdkmanager --list_installed
Installed packages:=====================] 100% Fetch remote repository...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;30.0.2 | 30.0.2 | Android SDK Build-Tools 30.0.2 | build-tools/30.0.2
emulator | 30.9.5 | Android Emulator | emulator
extras;android;m2repository | 47.0.0 | Android Support Repository | extras/android/m2repository
extras;google;m2repository | 58 | Google Repository | extras/google/m2repository
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4
platform-tools | 31.0.3 | Android SDK Platform-Tools | platform-tools
platforms;android-30 | 3 | Android SDK Platform 30 | platforms/android-30
system-images;android-30;google_apis;x86 | 10 | Google APIs Intel x86 Atom System Image | system-images/android-30/google_apis/x86
If I tried different sdk_root=$ANDROID_SDK_ROOT/build-tools, then I got a request to accept the license. But after accept it, the package wasn't installed neither.
January 16, 2019
---------------------------------------
Accept? (y/N): y
Info: Preparing "Install SDK Patch Applier v4 (revision: 1)".
Warning: Failed to read or create install properties file.

Have to run sdkmanager in sudo mode.
$ sudo sdkmanager --install "build-tools;30.0.3" --sdk_root=$ANDROID_SDK_ROOT --verbose
[sudo] password for <debian>:
sudo: sdkmanager: command not found
But command above went wrong, because running a command that is known to exist in a folder that is in a $PATH but fails when attempting to execute with sudo. So I login as root sudo su and run the command above. You can also try one of solutions here to pass env var for sudoers.

Related

Bubblewrap CLI throws "ERROR spawn jarsigner ENOENT"

I am trying to make an initial build of a PWA (Progressive Web App) that is vanilla JS/HTML/CSS using using TWA (Trusted Web Activity) and Bubblewrap, but get the message cli ERROR spawn jarsigner ENOENT
The $ bubblewrap init --manifest=https://my-pwa.com/manifest.json step was seemingly successful.
However, when I go to build the project I get the following:
$ bubblewrap build
,-----. ,--. ,--. ,--.
| |) /_,--.,--| |-.| |-.| |,---.,--. ,--,--.--.,--,--.,---.
| .-. | || | .-. | .-. | | .-. | |.'.| | .--' ,-. | .-. |
| '--' ' '' | `-' | `-' | \ --| .'. | | \ '-' | '-' '
`------' `----' `---' `---'`--'`----'--' '--`--' `--`--| |-'
`--'
Please, enter passwords for the keystore /home/my-user/AndroidStudioProjects/android.keystore and alias android.
? Password for the Key Store: ***************
? Password for the Key: ***************
Building the Android App...
- Generated Android APK at ./app-release-signed.apk
cli ERROR spawn jarsigner ENOENT
Further context:
$ bubblewrap doctor
doctor Your jdkpath and androidSdkPath are valid.
$ node -v
v19.3.0
$ printf "%s\n" $PATH
/home/my-user/.local/share/nvm/v19.3.0/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
/snap/bin
$cat ~/.bubblewrap/config.json
{"jdkPath":"/usr/lib/jvm/default-java/","androidSdkPath":"/home/my-user/Android/Sdk/"}
Answers or any clues on where to investigate next appreciated, thanks.
My issue was resolved by putting a copy of OpenJDK 11 within my home directory and updating the jdkPath in /home/my-user/.bubblewrap/config.json with its location: {"jdkPath":"/home/my-user/Android/jdk-11.0.17+8","androidSdkPath":"/home/my-user/Android/Sdk/"}

How to install brew on a raspberry pi?

These are my raspberry pi OS, Kernel version and archtecture configs
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 5.10.52-v7l+
Architecture: arm
When I try to run their script(https://brew.sh/):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
I get
Homebrew on Linux is only supported on Intel processors!
and, whenever I try to run a brew command, I get:
-bash: brew: command not found
Homebrew for linux is called Linuxbrew. And the installation command that you need is:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
Please check out this link to get more info about it: https://github.com/Linuxbrew/brew
Also notice that while Linuxbrew can run on Raspberry Pi (32-bit ARM), no binary packages are available for it.
Here are my two cents on installing brew on RaspberryPi Zero W and RaspberryPi 3+ (RaspberryPi OS, bullseye).
$ # Install dependencies
$ sudo apt update -y && sudo apt upgrade -y
$ sudo apt install git
$ # Install rbenv and Ruby 2.6.8 (It takes 30-90 min.)
$ # As of 2022/06/09, ARM processors require Ruby 2.6.8.
$ # Check the gist below what is doing as well.
$ bash <(curl -sL https://gist.github.com/KEINOS/7101f542be23e5048198e2a27c3cfda8/raw/install_ruby_rpi.sh)
$ source ~/.bashrc
$ # Smoke test Ruby
$ ruby --version
ruby 2.6.8p205 (2021-07-07 revision 67951) [armv6l-linux-eabihf]
$ # Clone homebrew repo under /opt
$ sudo git clone --depth=1 https://github.com/Homebrew/brew /opt/homebrew
$ # Setup homebrew
$ sudo chown -R $(whoami) /opt/homebrew
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bashrc
$ source ~/.bashrc
$ # Full update to tap homebrew/core (It takes 30-90 min.)
$ brew update --force --verbose
$ # Smoke test brew
$ brew --version
Homebrew 3.5.1
Homebrew/homebrew-core (git revision 1d9fb5dd1e6; last commit 2022-06-09)
$ # Install "hello world" package which supports both 32bit and 64 bit ARM.
$ # - Source: https://github.com/KEINOS/Hello-Cobra
$ # - Formula: https://github.com/KEINOS/homebrew-Hello-Cobra
$ brew install KEINOS/Hello-Cobra/hello-cobra
***snip***
$ hello-cobra hello world
Hello, world!
$ # Env info of RaspberryPi Zero W
$ more /proc/device-tree/model
Raspberry Pi Zero W Rev 1.1
$ cat /etc/debian_version
11.3
$ uname -a
Linux rpi-zero 5.10.92+ #1514 Mon Jan 17 17:35:21 GMT 2022 armv6l GNU/Linux
$ whoami
pi
$ echo $SHELL
/bin/bash
$ # Env info of RaspberryPi 3+
$ more /proc/device-tree/model
Raspberry Pi 3 Model B Rev 1.2
$ cat /etc/debian_version
11.3
$ uname -a
Linux rpi-3pls 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64 GNU/Linux
$ whoami
pi
$ echo $SHELL
/bin/bash
Note that everything for brew is slow on ARM6. Patience is required not only when setting up linuxbrew, but also when installing packages using brew.
However, once the package has been successfully installed, it should work as fast as expected. So, I'd say it is worth trying linuxbrew on the ARM6 and ARM64 architectures.
References
ARM | Homebrew on Linux # docs.brew.sh
Untar anywhere | Installation # docs.brew.sh
How can I check the available version of a package in the repositories? # AskUbuntu.com
Installing Ruby versions | rbenv # GitHub
Raspberry Pi
Homebrew can run on Raspberry Pi (32-bit ARM), but no binary packages
(bottles) are available. Support for Raspberry Pi is on a best-effort
basis. Pull requests are welcome to improve the experience on
Raspberry Pi.
https://docs.brew.sh/Homebrew-on-Linux
Two comments on installing Homebrew on Raspberry Pi 400 Rev 1.0, Raspbian Debian 11.5.
For an unknown reason Homebrew installer requires exactly ruby version 2.6.8. My Pi has ruby 2.7.4 but that was not accepted
After installing 2.6.8 using the above hint (ruby-build available from the regular repository does not offer it, the next after 2.6.6 being 2.7.0), the brew update --force --verbose command was still failing on not finding 2.6.8. It was so because the 'brew' script has the PATH explicitely filtered to the system one, "/usr/bin:/bin:/usr/sbin:/sbin". Only after manually adding the path for ruby 2.6.8 did the update work. NB. the script was overwritten during the process so in order to install any package I had to add the path it again.
Any idea why it is "exactly 2.6.8" and not "2.6.8 or newer"?

CentOS RPM Packages

When I do rpm -qa | grep nano I can see that Nano Text Editor is installed onto my CentOS box.
But when I do rpm -qpi nano-2.9.8-1.el8.x86_64.rpm in the below given directory it shows me Install Date: (not installed)
Directory: cd /run/media/root/CentOS-8-BaseOS-x86_64/BaseOS/Packages/
[root#karancentos ~]# cd /run/media/root/CentOS-8-BaseOS-x86_64/BaseOS/Packages/
[root#karancentos Packages]# rpm -qpi nano-2.9.8-1.el8.x86_64.rpm
Name : nano
Version : 2.9.8
Release : 1.el8
Architecture: x86_64
Install Date: (not installed)
Group : Unspecified
Size : 2328511
License : GPLv3+
Signature : RSA/SHA256, Mon 01 Jul 2019 08:15:52 PM EDT, Key ID 05b555b38483c65d
Source RPM : nano-2.9.8-1.el8.src.rpm
Build Date : Sat 11 May 2019 11:03:56 AM EDT
Build Host : x86-02.mbox.centos.org
Relocations : (not relocatable)
Packager : CentOS Buildsys <bugs#centos.org>
Vendor : CentOS
URL : https://www.nano-editor.org
Summary : A small text editor
Description :
GNU nano is a small and friendly text editor.
I'm not sure why does it comes up when doing rpm -qa | grep nano and then when I do rpm -qpi nano-2.9.8-1.el8.x86_64.rpm it shows me Install Date: (not installed)
Can someone please help me understand this?
Thanks!!
Using rpm -qpi <file> you're only querying a specific RPM package on the filesystem, here nano-2.9.8-1.el8.x86_64.rpm. However, without querying the RPM database (which does not happen if you use -p parameter!), the package is shown as "not installed". Only the RPM database knows if a package is installed or not. You're looking for rpm -qi <package>, thus rpm -qi nano in the specific case – this queries the RPM database and you will get the install date.

Fabric Mac: Not able to generate Fastlane

Recently I updated my Mac OS to High Sierra. After the OS update, the Fabric app is not working properly. Not able to generate the "Fastlane beta".
OS Details: Mac OS X: macOS High Sierra (10.13.2)
Fabric Details: App Version: 2.6.17 (1288) Fabric Version: 2.78.0
Environment:
<details><summary>✅ fastlane environment ✅</summary>
### Stack
| Key | Value |
| --------------------------- | ----------------------------------------------- |
| OS | 10.13.2 |
| Ruby | 2.2.4 |
| Bundler? | false |
| Git | git version 2.11.0 (Apple Git-81) |
| Installation Source | /usr/local/lib/fastlane_lib/bundle/bin/fastlane |
| Host | Mac OS X 10.13.2 (17C88) |
| Ruby Lib Dir | /usr/local/lib/fastlane_lib/bundle/lib |
| OpenSSL Version | OpenSSL 1.0.2g 1 Mar 2016 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | true |
| Xcode Path | /Applications/Xcode 8.3.app/Contents/Developer/ |
| Xcode Version | 8.3.3 |
### System Locale
| Variable | Value | |
| -------- | ----------- | - |
| LANG | en_US.UTF-8 | ✅ |
| LC_ALL | en_US.UTF-8 | ✅ |
| LANGUAGE | en_US.UTF-8 | ✅ |
### fastlane files:
**No Fastfile found**
**No Appfile found**
### fastlane gems
| Gem | Version | Update-Status |
| -------- | ------- | -------------- |
| fastlane | 2.78.0 | 💥 Check failed |
### Loaded fastlane plugins:
**No plugins Loaded**
<details><summary><b>Loaded gems</b></summary>
| Gem | Version |
| ------------------------- | ------------ |
| slack-notifier | 2.3.2 |
| CFPropertyList | 2.3.6 |
| claide | 1.0.2 |
| colored2 | 3.1.2 |
| nanaimo | 0.2.3 |
| xcodeproj | 1.5.4 |
| rouge | 2.0.7 |
| xcpretty | 0.2.8 |
| terminal-notifier | 1.8.0 |
| unicode-display_width | 1.3.0 |
| terminal-table | 1.8.0 |
| plist | 3.4.0 |
| public_suffix | 2.0.5 |
| addressable | 2.5.2 |
| multipart-post | 2.0.0 |
| word_wrap | 1.0.0 |
| tty-screen | 0.6.4 |
| tty-cursor | 0.5.0 |
| tty-spinner | 0.8.0 |
| babosa | 1.0.2 |
| colored | 1.2 |
| highline | 1.7.10 |
| commander-fastlane | 4.4.5 |
| excon | 0.60.0 |
| faraday | 0.14.0 |
| unf_ext | 0.0.7.4 |
| unf | 0.1.4 |
| domain_name | 0.5.20170404 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| fastimage | 2.1.1 |
| gh_inspector | 1.0.3 |
| json | 1.8.1 |
| mini_magick | 4.5.1 |
| multi_json | 1.13.1 |
| multi_xml | 0.6.0 |
| rubyzip | 1.2.1 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 1.0.0 |
| dotenv | 2.2.1 |
| bundler | 1.16.1 |
| faraday_middleware | 0.12.2 |
| uber | 0.1.0 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| representable | 3.0.4 |
| retriable | 3.1.1 |
| mime-types-data | 3.2016.0521 |
| mime-types | 3.1 |
| little-plugger | 1.1.4 |
| logging | 2.2.2 |
| jwt | 2.1.0 |
| memoist | 0.16.0 |
| os | 0.9.6 |
| signet | 0.8.1 |
| googleauth | 0.6.2 |
| httpclient | 2.8.3 |
| google-api-client | 0.13.6 |
| libxml-ruby | 3.0.0 |
</details>
*generated on:* **2018-02-01**
</details>
Can anyone please let me know what is the issue on this configuration? Thanks in advance.
EDIT:
I have tried the solution given by #Mike but, I couldn't resolve the issue. Please find the Terminal output,
Last login: Mon Feb 5 16:45:31 on qqvm915 Yuva-M:~ Yuva$ rm -rf
~/.fastlane/bin Yuva-M:~ Yuva$ rm -rf /usr/local/lib/fastlane_lib
Yuva-M:~ Yuva$ cd /Users/Yuva/Documents/iOS\
Applications/TestApp/TestApp\ App/TestApp\ App\ Dev Yuva-M:TestApp
Dev Yuva$ touch Gemfile Yuva-M:TestApp Dev Yuva$ bundle update
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not
fetch specs from https://rubygems.org/ Retrying fetcher due to error
(3/4): Bundler::HTTPError Could not fetch specs from
https://rubygems.org/ Retrying fetcher due to error (4/4):
Bundler::HTTPError Could not fetch specs from
https://rubygems.org/Resolving
dependencies............................ Using CFPropertyList 2.3.6
Using public_suffix 2.0.5 Using addressable 2.5.2 Fetching atomos
0.1.2
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your
password and install the bundled gems to RubyGems using sudo.
Password:
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your
password and install the bundled gems to RubyGems using sudo.
Password: Installing atomos 0.1.2 Using babosa 1.0.2 Using bundler
1.16.1 Using claide 1.0.2 Using colored 1.2 Using colored2 3.1.2 Using highline 1.7.10 Using commander-fastlane 4.4.5 Using declarative
0.0.10 Using declarative-option 0.1.0 Using unf_ext 0.0.7.4 Using unf 0.1.4 Using domain_name 0.5.20170404 Using dotenv 2.2.1 Using excon 0.60.0 Using multipart-post 2.0.0 Using faraday 0.14.0 Using http-cookie 1.0.3 Using faraday-cookie_jar 0.0.6 Using
faraday_middleware 0.12.2 Using fastimage 2.1.1 Fetching gh_inspector
1.1.1 Installing gh_inspector 1.1.1 Using jwt 2.1.0 Using little-plugger 1.1.4 Using multi_json 1.13.1 Using logging 2.2.2 Using
memoist 0.16.0 Using os 0.9.6 Using signet 0.8.1 Using googleauth
0.6.2 Using httpclient 2.8.3 Using mime-types-data 3.2016.0521 Using mime-types 3.1 Using uber 0.1.0 Using representable 3.0.4 Using
retriable 3.1.1 Using google-api-client 0.13.6 Fetching json 2.1.0
Installing json 2.1.0 with native extensions Using mini_magick 4.5.1
Using multi_xml 0.6.0 Using plist 3.4.0 Using rubyzip 1.2.1 Using
security 0.1.3 Using slack-notifier 2.3.2 Using terminal-notifier
1.8.0 Using unicode-display_width 1.3.0 Using terminal-table 1.8.0 Using tty-screen 0.6.4 Using tty-cursor 0.5.0 Using tty-spinner 0.8.0
Using word_wrap 1.0.0 Using nanaimo 0.2.3 Fetching xcodeproj 1.5.6
Installing xcodeproj 1.5.6 Using rouge 2.0.7 Using xcpretty 0.2.8
Using xcpretty-travis-formatter 1.0.0 Using fastlane 2.80.0 Bundle
updated! Yuva-M:TestApp Dev Yuva$ bundle exec fastlane beta [✔] 🚀
[17:10:27]: Could not find fastlane in current directory. Make sure to
have your fastlane configuration files inside a folder called
"fastlane". Would you like to set fastlane up? (y/n) y [✔] Looking for
iOS and Android projects in current directory... [17:10:34]: Created
new folder './fastlane'. [17:10:34]: Detected an iOS/macOS project in
the current directory: 'TestApp.xcworkspace' [17:10:34]:
----------------------------- [17:10:34]: --- Welcome to fastlane 🚀 --- [17:10:34]: ----------------------------- [17:10:34]: fastlane can help you with all kinds of automation for your mobile app [17:10:34]:
We recommend automating one task first, and then gradually automating
more over time [17:10:34]: What would you like to use fastlane for?
1. 📸 Automate screenshots
2. 👩‍✈️ Automate beta distribution to TestFlight
3. 🚀 Automate App Store distribution
4. 🛠 Manual setup - manually setup your project to automate your tasks ?
Fastlane folder generated into project directory but, no file were there. I just tried to generate a build from "Fabric" Mac App, still am getting the error (Find the screenshot.) Any guidance? Thanks.
Mike from Fabric. I'd recommend switching from fastlane in Fabric to using it independently. Here's how to do it, referenced from Felix Krause.
In terminal, run:
rm -rf ~/.fastlane/bin
-- This removes the current fastlane installation from your home directory.
rm -rf /usr/local/lib/fastlane_lib
-- This removes the current fastlane installation from your system.)
After, edit your ~/.bashrc or ~/.bash_profile and remove any reference to fastlane. We're clearing everything out so that you can set up a fresh install.
Now, navigate to your project directory and run touch Gemfile. Add the following content to that file:
source "https://rubygems.org"
gem "fastlane"
Save the file and run bundle update. Commit both the Gemfile and the Gemfile.lock to version control and from now on, every time you run fastlane, prefix your command using bundle exec:
bundle exec fastlane beta
Finally, restart the Fabric macOS app and you'll be all set.

Dockerfile RUN command not working

I am trying to create IBM WAS image from my local binary but it is not working . i used the dockerfile and added below command but getting error :
Dockerfile:
FROM centos:centos6
RUN yum update -y
RUN "/docker/software/im/installc -acceptLicense -accessRights nonAdmin \
-installationDirectory /docker/IBM/InstallationManager -dataLocation /docker/var/ibm/InstallationManager -showProgress"
Error:
---> Running in 206e970b75c8 /bin/sh: /docker/software/im/installc -acceptLicense -accessRights nonAdmin -installationDirectory /docker/IBM/InstallationManager -dataLocation
/docker/var/ibm/InstallationManager -showProgress: No such file or
directory The command '/bin/sh -c "/docker/software/im/installc
-acceptLicense -accessRights nonAdmin -installationDirectory /docker/IBM/InstallationManager -dataLocation
/docker/var/ibm/InstallationManager -showProgress"' returned a
non-zero code: 127
Docker is trying to run installc from within the image. The image centos:centos6 image does not contain IBM Installation Manager.
I recommend taking a look at the WebSphere traditional Docker images published by IBM to Docker hub. If you wish to create something slightly different for example use centos instead of ubuntu then take a look at the instructions for building WebSphere traditional Docker images, they are Apache licensed so you are free to adapt them.
Docker build error :
/bin/sh: /tmp/im/installc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
The command '/bin/sh -c unzip -qd /tmp/im /tmp/agent.installer.linux.gtk.x86_1.8.0.20140902_1503.zip && /tmp/im/installc -acceptLicense -show Progress -installationDirectory /usr/lib/im -dataLocation /var/im && rm -rf /tmp/agent.installer.linux.gtk.x86_1.8.0.20140902_1503.zip /tmp/i m' returned a non-zero code: 126
Linux version : AWS linux 3.10.0-514.10.2.el7.x86_64 #1 SMP Mon Feb 20 02:37:52 EST 2017 x86_64 x86_64 x86_64 GNU/Linux