nraboy / ubuntu-nativescript-installer

Install Node.js, the Android SDK, and Telerik NativeScript in Ubuntu via a single script
MIT License
29 stars 18 forks source link

script must be updated to be compatible with native script 4 #3

Open bawasaab opened 6 years ago

bawasaab commented 6 years ago

deepak@deepak-VirtualBox ~/ubuntu-nativescript-installer-master $ chmod +x ubuntu_nativescript_installer.sh deepak@deepak-VirtualBox ~/ubuntu-nativescript-installer-master $ sudo ./ubuntu_nativescript_installer.sh [sudo] password for deepak: Sorry, try again. [sudo] password for deepak: Hit:1 http://archive.canonical.com/ubuntu xenial InRelease Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:5 http://packages.linuxmint.com sylvia InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:7 http://packages.linuxmint.com sylvia Release
Reading package lists... Done Preconfiguring packages ... (Reading database ... 197948 files and directories currently installed.) Preparing to unpack .../libc6-dbg_2.23-0ubuntu10_amd64.deb ... Unpacking libc6-dbg:amd64 (2.23-0ubuntu10) over (2.23-0ubuntu9) ... Preparing to unpack .../libc6_2.23-0ubuntu10_amd64.deb ... Unpacking libc6:amd64 (2.23-0ubuntu10) over (2.23-0ubuntu9) ... Selecting previously unselected package libc6:i386. Preparing to unpack .../libc6_2.23-0ubuntu10_i386.deb ... Unpacking libc6:i386 (2.23-0ubuntu10) ... Setting up libc6:amd64 (2.23-0ubuntu10) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Selecting previously unselected package libgcc1:i386. (Reading database ... 198252 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a6.0.1-0ubuntu1_i386.deb ... Unpacking libgcc1:i386 (1:6.0.1-0ubuntu1) ... Selecting previously unselected package gcc-6-base:i386. Preparing to unpack .../gcc-6-base_6.0.1-0ubuntu1_i386.deb ... Unpacking gcc-6-base:i386 (6.0.1-0ubuntu1) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Setting up gcc-6-base:i386 (6.0.1-0ubuntu1) ... Setting up libgcc1:i386 (1:6.0.1-0ubuntu1) ... Setting up libc6:i386 (2.23-0ubuntu10) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... (Reading database ... 198257 files and directories currently installed.) Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../libgfortran3_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libgfortran3:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Selecting previously unselected package gcc-5-base:i386. Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.9_i386.deb ... Unpacking gcc-5-base:i386 (5.4.0-6ubuntu1~16.04.9) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Processing triggers for man-db (2.7.5-1) ... Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up gcc-5-base:i386 (5.4.0-6ubuntu1~16.04.9) ... (Reading database ... 198260 files and directories currently installed.) Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.9_amd64.deb ... Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.9) over (5.4.0-6ubuntu1~16.04.5) ... Selecting previously unselected package libstdc++6:i386. Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.9_i386.deb ... Unpacking libstdc++6:i386 (5.4.0-6ubuntu1~16.04.9) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libstdc++6:i386 (5.4.0-6ubuntu1~16.04.9) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Selecting previously unselected package zlib1g:i386. (Reading database ... 198264 files and directories currently installed.) Preparing to unpack .../zlib1g_1%3a1.2.8.dfsg-2ubuntu4.1_i386.deb ... Unpacking zlib1g:i386 (1:1.2.8.dfsg-2ubuntu4.1) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Setting up libc6-dbg:amd64 (2.23-0ubuntu10) ... Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up cpp-5 (5.4.0-6ubuntu1~16.04.9) ... Setting up gcc-5 (5.4.0-6ubuntu1~16.04.9) ... Setting up libgfortran3:amd64 (5.4.0-6ubuntu1~16.04.9) ... Setting up zlib1g:i386 (1:1.2.8.dfsg-2ubuntu4.1) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... W: http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libgomp1_5.4.0-6ubuntu1~16.04.9_amd64.deb: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf) E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/j/java-common/default-jre-headless_1.8-56ubuntu2_amd64.deb 400 Bad Request [IP: 91.189.88.161 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? --2018-05-10 17:08:26-- https://nodejs.org/download/release/v4.2.6/node-v4.2.6-linux-x64.tar.gz Resolving nodejs.org (nodejs.org)... 104.20.23.46, 104.20.22.46, 2400:cb00:2048:1::6814:162e, ... Connecting to nodejs.org (nodejs.org)|104.20.23.46|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 11827647 (11M) [application/gzip] Saving to: ‘nodejs.tgz’

nodejs.tgz 100%[=====================================================================================>] 11.28M 1.55MB/s in 8.5s

2018-05-10 17:08:36 (1.32 MB/s) - ‘nodejs.tgz’ saved [11827647/11827647]

--2018-05-10 17:08:37-- http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz Resolving dl.google.com (dl.google.com)... 172.217.160.238, 2404:6800:4002:807::200e Connecting to dl.google.com (dl.google.com)|172.217.160.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 326412652 (311M) [application/x-tar] Saving to: ‘android-sdk.tgz’

android-sdk.tgz 100%[=====================================================================================>] 311.29M 1.37MB/s in 3m 33s

2018-05-10 17:12:16 (1.46 MB/s) - ‘android-sdk.tgz’ saved [326412652/326412652]

/opt/android-sdk/tools/android: 1: /opt/android-sdk/tools/android: java: not found /opt/android-sdk/tools/android: 1: /opt/android-sdk/tools/android: java: not found /opt/android-sdk/tools/android: 110: exec: java: not found WARN engine nativescript@4.0.0: wanted: {"node":">=6.0.0 <10.0.0"} (current: {"node":"4.2.6","npm":"2.14.12"}) npm WARN peerDependencies The peer dependency marked@^0.3.6 included from marked-terminal will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. npm WARN peerDependencies The peer dependency grunt@>= 0.4.5 included from grunt-contrib-clean will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. npm WARN peerDependencies The peer dependency grunt@^1.0.1 || ^0.4.0 included from grunt-ts will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. npm WARN peerDependencies The peer dependency typescript@^2.3.3 || ~1 included from grunt-ts will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.6","npm":"2.14.12"}) npm WARN peerDependencies The peer dependency typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev included from tslint will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. npm ERR! Linux 4.10.0-38-generic npm ERR! argv "/opt/node/bin/node" "/opt/node/bin/npm" "install" "-g" "nativescript" "--unsafe-perm" npm ERR! node v4.2.6 npm ERR! npm v2.14.12 npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.1.2 npm ERR! notsup Valid OS: darwin npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: linux npm ERR! notsup Actual Arch: x64

nativescript@4.0.0 preuninstall /opt/node/lib/node_modules/nativescript node preuninstall.js

Failed to complete all pre-uninstall steps.

npm ERR! Please include the following file with any support request: npm ERR! /home/deepak/npm-debug.log chown: cannot access '.android': No such file or directory chown: cannot access '.node-gyp': No such file or directory chown: cannot access '.tnsrc': No such file or directory chown: cannot access '.nativescript-cli': No such file or directory

Restart your Ubuntu session for installation to complete...

bawasaab commented 6 years ago

you need to update the following paths

ANDROID_SDK_X64="https://dl.google.com/android/archives/android-sdk-linux_x86-1.6_r1.tgz" NODE_X64="https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz"

plz add code to extract tar.xz file