PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label apt-get. Show all posts
Showing posts with label apt-get. Show all posts

Sunday, May 15, 2022

[FIXED] How to install Android SDK on Ubuntu?

 May 15, 2022     android, apt-get, installation, linux, ubuntu     No comments   

Issue

For my Ubuntu machine, I downloaded the latest version of Android SDK from this page.

After extracting the downloaded .tgz file, I was trying to search for installation instructions and found:

To get started on Linux:

Unpack the .zip file you've downloaded. The SDK files are download separately to a user-specified directory.

Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line.

What exactly are we supposed to do?


Solution

Option 1:

sudo apt update && sudo apt install android-sdk

The location of Android SDK on Linux can be any of the following:

  • /home/AccountName/Android/Sdk

  • /usr/lib/android-sdk

  • /Library/Android/sdk/

  • /Users/[USER]/Library/Android/sdk

Option 2:

  • Download the Android Studio.

  • Extract downloaded .zip file.

    The extracted folder name will read somewhat like android-studio

To keep navigation easy, move this folder to Home directory.

  • After moving, copy the moved folder by right clicking it. This action will place folder's location to clipboard.

  • Use Ctrl Alt T to open a terminal

  • Go to this folder's directory using cd /home/(USER NAME)/android-studio/bin/

  • Type this command to make studio.sh executable: chmod +x studio.sh

  • Type ./studio.sh

A pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I'll go with selecting I do not have a previous version of Studio or I do not want to import my settings.

If you choose to import settings anyway, you may need to close any old project which is opened in order to get a working Android SDK.

./studio.sh popup

From now onwards, setup wizard will guide you.

Android studio setup wizard

Android Studio can work with both Open JDK and Oracle's JDK (recommended). Incase, Open JDK is installed the wizard will recommend installing Oracle Java JDK because some UI and performance issues are reported while using OpenJDK.

The downside with Oracle's JDK is that it won't update with the rest of your system like OpenJDK will.

The wizard may also prompt about the input problems with IDEA .

Select install type

Select Android studio install type

Verify installation settings

Verify Android studio installation settings

An emulator can also be configured as needed.

Android studio emulator configuration prompt

The wizard will start downloading the necessary SDK tools

The wizard may also show an error about Linux 32 Bit Libraries, which can be solved by using the below command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1

After this, all the required components will be downloaded and installed automatically.

After everything is upto the mark, just click finish

Completed installation of Android studio

To make a Desktop icon, go to 'Configure' and then click 'Create Desktop Entry'

Creating Android studio desktop icon

Creating Android studio desktop icon for one or multiple users

source



Answered By - xameeramir
Answer Checked By - Cary Denson (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Saturday, May 14, 2022

[FIXED] Why does Ubuntu have old versions of nodejs and npm in their apt-get package manager?

 May 14, 2022     apt-get, node.js, npm, ubuntu     No comments   

Issue

When I install nodejs and npm with apt-get

sudo apt-get update
sudo apt-get install nodejs modejs-legacy npm
I have the versions

I get the following versions

npm -v
1.3.10

nodejs -v
v0.10.25

I know how to update these manually, but why does the apt-get package manager have old versions of these packages?


Solution

It's better to use the ppa from nodesource. They have done a great job keeping it updated and offering not only LTS but also latest versions of node available. https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

As easy as running this from your cli:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs

UPDATE:

The reason WHY the package manager has old versions of the binaries is due to the fact it takes time for the maintainers of the provided packages to properly build and test new ones with updated versions.

The good thing is that you can consume and install packages from other repositories (ppa).



Answered By - onel0p3z
Answer Checked By - Cary Denson (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

[FIXED] What is the correct value of ODBCDM_Home for unixodbc on ubuntu

 May 14, 2022     apt-get, oracleclient, ubuntu, unixodbc     No comments   

Issue

I installed unixodbc and unixodbc-dev through apt-get. I then installed oracle instantclient (both the basic and the odbc drivers). Now I am trying to run odbc_update_ini.sh but none of the paths I have tried for the ODBCDM_Home argument seem to be correct. On OSX where I installed unixodbc with brew I was able to use /usr/local/Cellar/unixodbc/2.3.4/ to make things work correctly. But I cannot figure out the ubuntu/apt-get equivalent.


Solution

I always change odbc.ini and odbcinst.ini manually. If you really want to use this odbc_update_ini.sh utility I would suggest to analyze its source code in order to check the path of the files it uses.

I won't be surprised if you need to set ODBCDM_Home to the root (/) directory.



Answered By - mauro
Answer Checked By - Mary Flores (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home
View mobile version

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing