I have spent the last to days trying to solve my error setting up sdk on linux mint12. I keep getting this error.
[Qoute]
scott-Presario-CQ62-Notebook-PC scott # apt-get -f installReading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc-bin libc6
Suggested packages:
glibc-doc
The following NEW packages will be installed:
libc-bin
The following packages will be upgraded:
libc6
1 upgraded, 1 newly installed, 0 to remove and 376 not upgraded.
3 not fully installed or removed.
Need to get 0 B/5,143 kB of archives.
After this operation, 3,432 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
[Qoute]
I have tried every fix I have found online and all return this exact error. I tried changing the permisons on etc/sudoers to make sure they were right. I also added a these paths.
export PATH={PATH}:/usr/local/sbin:/usr/sbin:/sbin
export PATH={PATH}:/usr/local/bin:/usr/bin:/bin
I have even placed a permission file inside sudoers.d to try to add the path but I just ended up ruining my root access and have to do a complicated fix through my bootloader.but just cant seem to get it to work I am newer to linux and know basic commands but have no idea why I keep getting the same error or how to fix it any help would be deeply appreciated.
Are you running 64 bit? You need to dl the 32 bit lib's
Now it may be cheating, but try Tommytommatoe's android utility it sets up SDK for you and adds everything to your path... It's my go to for stubborn SDK
Sent from my PC36100 using xda premium
Yea it 64bit and I added the 32 bit libs for java but it gives the error when I try that to. I guess I will try that tanks man
Sent from my ADR6425LVW using XDA
Are you using an installer script or something like that?
RoberGalarga said:
Are you using an installer script or something like that?
Click to expand...
Click to collapse
No just piece by piece did java then unpacked SDK in my root dir and update it installed the API and all that then when I try to use adb it says their is no command and all the fixes make the error I described at first.
Sent from my ADR6425LVW using XDA
Ok... you don't need any fixes... you can simply move to platform-tools directory (using command cd /path/to/platform-tools) to can run ./adb command (note: ./adb, not adb).
RoberGalarga said:
Ok... you don't need any fixes... you can simply move to platform-tools directory (using command cd /path/to/platform-tools) to can run ./adb command (note: ./adb, not adb).
Click to expand...
Click to collapse
Really now I feel dumb lol. Guess I'm to used to windows been developing on it for a while. Thanks a lot.
Sent from my ADR6425LVW using XDA
Well thanks for all your help guys I guess I had a bad download of linux so I did a new clean install and setup SDK and apktool and dsixdas kitchen. Now everything works fine. No sudo errors or nothing the good news is with all the trying to fix what was wrong I got used to root being / instead of c:/ so that's a bonus
Sent from my ADR6425LVW using XDA
Related
(This is not nessesary for MAC but you can have this for further use later,
In general you will need:
Python 2.4 -- 2.7, which you can download from python.org.
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from java.sun.com.
Git 1.7 or newer. You can find it at git-scm.com)
Setting up a Mac OS X build environment
To build the Android files in a Mac OS environment, you need an Intel/x86 machine running MacOS 10.6 (Snow Leopard).
Android must be built on a case-sensitive file system because the sources contain files that differ only in case. We recommend that you build Android on a partition that has been formatted with the journaled file system HFS+. HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OS X.
Creating a case sensitive disk image
If you want to avoid partitioning/formatting your hard drive, you can use a case-sensitive disk image instead. To create the image, launch Disk Utility and select "New Image". A size of 25GB is the minimum to complete the build, larger numbers are more future-proof. Using sparse images saves space while allowing to grow later as the need arises. Be sure to select "case sensitive, journaled" as the volume format.
You can also create it from a shell with the following command:
# hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg
This will create a .dmg (or possibly a .dmg.sparsefile) file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your ~/.bash_profile to mount the image when you execute "mountAndroid":
# mount the android file image
function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }
Once mounted, you'll do all your work in the "android" volume. You can eject it (unmount it) just like you would with an external drive.
Installing required packages
Install XCode from the Apple developer site http://developer.apple.com/. We recommend version 3.1.4 or newer, i.e. gcc 4.2. Version 4.x could cause difficulties. If you are not already registered as an Apple developer, you will have to create an Apple ID in order to download.
Install MacPorts from macports.org.
Note: Make sure that /opt/local/bin appears in your path BEFORE /usr/bin. If not, add
export PATH=/opt/local/bin:$PATH
to your ~/.bash_profile.
Get make, git, and GPG packages from MacPorts:
$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg
If using Mac OS 10.4, also install bison:
$ POSIXLY_CORRECT=1 sudo port install bison
Reverting from make 3.82
There is a bug in gmake 3.82 that prevents android from building. You can install version 3.81 using MacPorts by taking the following steps:
Edit /opt/local/etc/macports/sources.conf and add a line that says
file:///Users/Shared/dports
above the rsync line. Then create this directory:
$ mkdir /Users/Shared/dports
In the new dports directory, run
$ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/
Create a port index for your new local repository:
$ portindex /Users/Shared/dports
Finally, install the old version of gmake with
$ sudo port install gmake @3.81
Setting a file descriptor limit
On MacOS the default limit on the number of simultaneous file descriptors open is too low and a highly parallel build process may exceed this limit.
To increase the cap, add the following lines to your ~/.bash_profile:
# set the number of open files to be 1024
ulimit -S -n 1024
Next: Download the source
Your build environment is good to go! Proceed to downloading the source....
Why you posted this? It can be found on android's website. Also,you didn't post the whole tutorial.
why not simply install VirtualBox vor Mac and install a VM within?
...sometimes the life is complicated^^
@SWEATTAIMI did you actually manage to get a fully working build on mac? And if yes which version of OS X?
I've tried many times on OS X 10.7 and eventually ended up installing ubuntu on a separate partition...
secondary partition? what about the users here?
i use a VM on a small **** x86 notebook and can do all the development work + complete compiling. i thought a mac has much better hardware^^
I used to have ubuntu installed in vmware too but compiling took too long and it was really annoying. I rather prefer it this way... No shared resources
popdog123 said:
@SWEATTAIMI did you actually manage to get a fully working build on mac? And if yes which version of OS X?
I've tried many times on OS X 10.7 and eventually ended up installing ubuntu on a separate partition...
Click to expand...
Click to collapse
Fully working what ?
Sent from my LG-P500 using xda premium
ciaox said:
Why you posted this? It can be found on android's website. Also,you didn't post the whole tutorial.
Click to expand...
Click to collapse
This is full for mac
Its a setup only
Sent from my LG-P500 using xda premium
SWEATTAIMI said:
Fully working what ?
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
:|
10 char
popdog123 said:
:|
10 char
Click to expand...
Click to collapse
You mean build then i have not came to that point yet as i downloaded all sources on my Japanese lesson xD
Sent from my LG-P500 using xda premium
I wonder if this will work for ICS on 4GB macbook
caslca said:
I wonder if this will work for ICS on 4GB macbook
Click to expand...
Click to collapse
Yes it will worked on a macbook 2010 version
Sent from Mexico
I ran the Snowball Mod without a hitch. I then tried to run the update but it won't run for some reason. The window flashes some text quickly but then closes so I'm not even really sure why it's not working. Anyone run into this or have any ideas. Thanks in advance!
I haven't had the time to try out the snowball mod, yet -- so I can't offer any advice. But, I would post the issue in the development thread, that's where the most help will be.
Swyped from my B&N Nook Tablet.
Try running it from a command line to keep it up and be able to read any text.
Also, there is a log.txt, if you post that, it can be more helpful.
Yeah I was goin to but I don't have enough posts. I was hoping someone would see it here.
Well... if you post your log.txt and start it from a command-line window rather than double clicking the update.bat, then we can take a look at what's up.
Log file says:
Snowball is reporting: v2.0.2
NO PACKAGE AVAILABLE
Command line:
Snowball is reporting: v2.0.2
There does not appear to be a package for the version snowball is reporting.
Are you sure you're not reapplying an update?
Perhaps you are accidentally trying to apply an "outdate"?
Thanks a lot!
There is no v2.0.2 update package in the zip folder. I renamed v2.0.1 to v2.0.2 and ran. Not sure if this was a good thing to do or not. Any help or direction would be appreciated. Thanks.
No write permissions
Tried to install snowball mod from a macbook pro by just running the snowball.sh. Started up and the B&N stuff was all there, although it looked like it ran without a hitch.
Looked at the log file in the snowball-mod folder and saw a lot of "Read-only file system" business. The first few lines being:
unzip: can't open nook-update-package.zip, nook-update-package.zip.zip, nook-update-package.zip.ZIP^M
rm failed for nook-update-package.zip, Read-only file system^M
Installing nook-update-package...
cd: can't cd to /mnt/media/nook-update-package^M
sh: Can't open install^M
rm failed for /mnt/media/nook-update-package, No such file or directory^M
Click to expand...
Click to collapse
How do you suggest I get around that?
conundrum768 said:
I haven't had the time to try out the snowball mod, yet -- so I can't offer any advice. But, I would post the issue in the development thread, that's where the most help will be.
Swyped from my B&N Nook Tablet.
Click to expand...
Click to collapse
We need 10 legit posts before we are allowed to post in the dev forum
Robotronik said:
Tried to install snowball mod from a macbook pro by just running the snowball.sh. Started up and the B&N stuff was all there, although it looked like it ran without a hitch.
Looked at the log file in the snowball-mod folder and saw a lot of "Read-only file system" business. The first few lines being:
How do you suggest I get around that?
Click to expand...
Click to collapse
Huh... this is weird... /mnt/media should not be read-only... although, I suppose, perhaps if you had it USB mounted, it might end up read-only.
Ensure that you have Automatic USB mounting turned off before you run the script.
You can actually push this update via wifi if you mod the update.bat (or update.sh for linux users) file.
Just turn on ADB Wifi (I prefer adbWireless app) and add the following to your bat file:
Code:
echo Waiting for device...
[B]adb connect XXX.XXX.XXX.XXX:XXXX[/B]
adb wait-for-device
...
adb shell "chmod 755 /data/local/tmp/update-package.sh ; su -c /data/local/tmp/update-package.sh" >> log.txt
if exist reboot adb reboot
[B]adb connect XXX.XXX.XXX.XXX:XXXX[/B]
echo INSTALLATION SUCCESSFUL
Use your IPort given to you by your ADB Wifi app in place of XXXs. Then just run the .bat!
Run from cmd if you don't want the output to vanish right away.
cfoesch said:
Ensure that you have Automatic USB mounting turned off before you run the script.
Click to expand...
Click to collapse
Okay, that got me a little further. Now:
Extracting nook-update-package...
Archive: nook-update-package.zip
creating: nook-update-package/data/
unzip: can't set permissions of directory 'nook-update-package': Operation not permitted
unzip: exiting
Installing nook-update-package...
sh: Can't open install
Click to expand...
Click to collapse
More permissions issues...
Still posting here because I don't have the 10 total posts to go in the Dev forum...
Anyway, I did the factory reinstall, and reran the snowballmod update. It said the root was still there, so I commented out that check from the snowball.sh, reran the package and everything went swimmingly.
Now, for the update:
The terminal spits out this:
Waiting for device...
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
7 KB/s (46 bytes in 0.006s)
Snowball is reporting: v2.0.2
.zipte-package-v2.0.2
There does not appear to be a package for the version snowball is reporting.
Are you sure you're not reapplying an update?
Perhaps you are accidentally trying to apply an 'outdate'?
Click to expand...
Click to collapse
Where the log file gives me:
Snowball is reporting: v2.0.2
NO PACKAGE AVAILABLE
Click to expand...
Click to collapse
The file "update-package-v2.0.2.zip" is in the directory. In the "update.sh" file replaced all instances of "${VERSION}" with "v2.0.2" and it seemed to work fine.
same
Robotronik said:
Still posting here because I don't have the 10 total posts to go in the Dev forum...
Anyway, I did the factory reinstall, and reran the snowballmod update. It said the root was still there, so I commented out that check from the snowball.sh, reran the package and everything went swimmingly.
Now, for the update:
The terminal spits out this:
Where the log file gives me:
The file "update-package-v2.0.2.zip" is in the directory. In the "update.sh" file replaced all instances of "${VERSION}" with "v2.0.2" and it seemed to work fine.
Click to expand...
Click to collapse
I AM HAVING THE SAME PROBLEM.MYBE..I need help some plz make a better howtos for dummies m
The first thing you need to do, if you have no clue what you're doing, is post the contents of the log file in the snowballmod folder.
The ".zipte-package-v2.0.2" seems to be related to adb shell "snowball-ver" returning DOS formatted text, even though you're in a *nix. I really did not expect this to happen with the linux and osx versions of adb, but apparently, they perform the same as cygwin... (cygwin I expected, after all, the adb.exe is a windows program). I will fix the update scripts to take that into account.
Code:
unzip: can't set permissions of directory 'nook-update-package': Operation not permitted
This message is reported by unzip when it is run by a non-root user on the /mnt/media partition.
You do _NOT_ have to run snowball-update though if you've installed snowball-mod fresh with the most recent version.
robtlebel said:
I AM HAVING THE SAME PROBLEM.MYBE..I need help some plz make a better howtos for dummies m
Click to expand...
Click to collapse
The changes made to the script were posted here:
Robotronik said:
Now, for the update:
The terminal spits out this:
Waiting for device...
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
7 KB/s (46 bytes in 0.006s)
Snowball is reporting: v2.0.2
.zipte-package-v2.0.2
There does not appear to be a package for the version snowball is reporting.
Are you sure you're not reapplying an update?
Perhaps you are accidentally trying to apply an 'outdate'?
Where the log file gives me:
Snowball is reporting: v2.0.2
NO PACKAGE AVAILABLE
The file "update-package-v2.0.2.zip" is in the directory. In the "update.sh" file replaced all instances of "${VERSION}" with "v2.0.2" and it seemed to work fine.
Click to expand...
Click to collapse
I had the same issue with the name of the update file being called incorrectly: ".zipte-package-v2.0.2". With that output the script is looking for a file of that name and it's not finding it. I just changed the value of the variable ${VERSION} to v2.0.2 (since that was what was being reported by Snowball as my current version) and all worked after that.
Easy to fix temporarily:
-open "update.sh" in a text editor
-go to line 66 and change
VERSION=`awk '//{ print $2 }' snowball.version`
Click to expand...
Click to collapse
to
VERSION=v2.0.2
Click to expand...
Click to collapse
or whatever version yours shows to be running (v2.0.1, etc). Something tells me it might be important to input the correct current version number in
-save and close the file and rerun it.
EDIT: or wait until cfoesch fixes the scripts
Scripts should be updated. I changed the awk program from just "//{ print $2 }" to "//{ sub('\r', '', $2); print $2 }" ... this means that it works both ways... *insert your favorite "both ways" joke here*
It should also detect if you haven't turned off automount, and warn you about it. If the nook ends up rebooting, then it would tear the USB mount and could cause file corruption. I got around it by putting things in /data rather than /mnt/media, but then realized, if it has to reboot, then it could cause trouble. So better, to just warn them that automount was on, and quit out.
It also detects better if something went wrong in the installation process, and should report that installation has failed, rather than successful under all cases.
Things may have gotten broken in the process, so keep up the bug reports.
I just can't stop Nookin' Around.........god i need to sleep
I decided to check out the update.sh script (can only go so far currently since I have the latest update).
At least for me, (Ubuntu Linux 11.10) I figured something out about the $OSTYPE call to set the $adb variable. I could echo $OSTYPE in the terminal and got a response, but could not echo it in any scripts. Ended up finding the "uname -o" call and that seems to have gotten it to work, although the printout is different.
snowball-update# echo $OSTYPE
linux-gnu
snowball-update# uname -o
GNU/Linux
Changed lines 7 & 8 and seems to have worked:
case `uname -o` in
GNU*|linux*|Linux*)
Now this last part is probably something on my end but: update.sh: 62: ./adblinux: Permission denied
Thanks again for the work (and everyone else involved in rooting/hacking these things )
Indeed. $OSTYPE seems to be specific to bash, and not all sh implementations.
If you don't mind could you do this command and give me the output? "ls -l /bin/sh" and "sh --version" Those two commands should explain exactly which implementation of sh you have. (For instance, on the NT with snowball-mod, the sh is a minimal implementation, and does not support $OSTYPE. But on most OSes I've seen sh is actually a statically linked bash, as it is the most widely used shell scripting language.)
The case on that you provided though could be a poor choice, as GNU*) would match GNU/freebsd, or GNU/openbsd, or GNU/anykernel. Sure it is unlikely, but it is possible.
The permissions issue is not entirely your end, but it is an expected artifact of extracting from a zip file. Although, is suppose performing a chmod 755 on it prior to use would be a good idea in general.
OK, let me first preface by saying that I have like zero development experience but I'm pretty smart and I'm trying to learn. You have to start somewhere, right?
So I decided to take a crack at it when I came across this thread:
http://forum.xda-developers.com/showthread.php?p=24278953
It's a Linux tutorial but having only a Mac, I decided to see if I could make it work. It didn't but the point is that, in the process, I learned a LOT.
So following a suggestion, I scrapped the whole Mac idea and started all over on an Ubuntu 11.4 VM. Which works great but it's a little less forgiving than the Mac.
Anyway, I have my build environment completely set up with all the necessary packages installed...no problem. I have the device specific proprietary files in place and pre-builts installed as well.
Now its time to build. I do so using this command:
Code:
source build/envsetup.sh
brunch otter -j$(gprep -c processor /proc/cpuinfo)
...runs for a couple minutes before stopping at this error:
Code:
In file included from frameworks/base/media/libmedia/IMediaPlayerService. cpp:25: frameworks/base/include/media/IOMX.h:29:17: error: jni.h: No such file or directory make: *** [out/target/product/otter/obj/SHARED_LIBRARIES/libmedia_ intermediates/IMediaPlayerService.o] Error 1
So basically, the file "IOMX.h" makes a declaration to include "jni.h" which isn't anywhere in my /android tree.
Upon further research I learn that "jni.h" has something to do with Java. I have the required java-sun-jdk 6.1.x installed so I figured it must be a problem with my $PATH. I found the "jni.h" in question in the Java folder and did an export $PATH to that folder. Then I entered echo $PATH to make sure:
Code:
echo $PATH /home/linux/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.26
Sure enough, the folder where "jni.h" is located is included in my path, but I'm still getting the same errors.
What am I doing wrong?
Sent from my Kindle Fire using xda premium
Hello friends! I post this on the off to pic because I can't really find a fitting sub-forum. If you know a better place I can post this thread, please let me know.
I want ruby and Ruby gems to run on my android device (galaxy S4 GT-I9515, not that it matters). I know android is Linux based so there shouldn't be a problem doing this.
Basically, I don't want to use Ruby for development, I just need to use some of it's applications (gems).
I tried ruboto core and ruboto IRB, but couldn't install a gem.
In general, my android won't read "apt-get" command in terminal. I don't know why.
If anyone could help me to run some Ruby gems on my device, I would really appreciate it. Thanks for people who answer!
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
Code:
$ apt list | grep ruby
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ruby/stable 2.3.3 arm
ruby-dev/stable 2.3.3 arm
ruby-ri/stable 2.3.3 all
weechat-ruby-plugin/stable 1.6-1 arm
TheKindleMCPEGuy said:
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
Code:
$ apt list | grep ruby
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ruby/stable 2.3.3 arm
ruby-dev/stable 2.3.3 arm
ruby-ri/stable 2.3.3 all
weechat-ruby-plugin/stable 1.6-1 arm
Click to expand...
Click to collapse
First of all thanks for the reply!
So, in order to use ruby on android all I have to do is use a more linux-like terminal, and use the command "$ apt list | grep ruby", am I right?
Will I have access to apt-get and commands like that with the new terminal?
FurySh0ck said:
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
First of all thanks for the reply!
So, in order to use ruby on android all I have to do is use a more linux-like terminal, and use the command "$ apt list | grep ruby", am I right?
Will I have access to apt-get and commands like that with the new terminal?
Click to expand...
Click to collapse
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
Code:
apt install ruby
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
Code:
$ apt install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3587 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Get:1 [url]http://termux.net[/url] stable/main arm ruby arm 2.3.3 [3587 kB]
Fetched 3587 kB in 1s (2878 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 2137 files and directories currently installed.)
Preparing to unpack .../archives/ruby_2.3.3_arm.deb ...
Unpacking ruby (2.3.3) ...
Processing triggers for man (1.13.4-3) ...
Setting up ruby (2.3.3) ...
When I ran the
Code:
gem
command I got this:
Code:
$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
[url]http://localhost:8808/[/url]
with info about installed gems
Further information:
[url]http://guides.rubygems.org[/url]
Enjoy!
TheKindleMCPEGuy said:
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
Code:
apt install ruby
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
Code:
$ apt install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3587 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Get:1 [url]http://termux.net[/url] stable/main arm ruby arm 2.3.3 [3587 kB]
Fetched 3587 kB in 1s (2878 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 2137 files and directories currently installed.)
Preparing to unpack .../archives/ruby_2.3.3_arm.deb ...
Unpacking ruby (2.3.3) ...
Processing triggers for man (1.13.4-3) ...
Setting up ruby (2.3.3) ...
When I ran the
Code:
gem
command I got this:
Code:
$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
[url]http://localhost:8808/[/url]
with info about installed gems
Further information:
[url]http://guides.rubygems.org[/url]
Enjoy!
Click to expand...
Click to collapse
Awesome! It worked well and neat. +1 For your Thanks-o'-meter.
Now I have some questions about termux, if you could answer:
1) Where does it save all the files? I used
Code:
apt update
and I am going to download packages from now on. I think I should know where it goes / how can I change that save directory.
2) When I tried using root permissions (you know, my device is rooted so I used
Code:
su
in order to gain access) I couldn't use apt commands anymore. I think some of my ruby gems will require root permissions, so I would like further explanation about it (only if you could of course )
FurySh0ck said:
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
When I ran the command I got this:
Awesome! It worked well and neat. +1 For your Thanks-o'-meter.
Now I have some questions about termux, if you could answer:
1) Where does it save all the files? I used and I am going to download packages from now on. I think I should know where it goes / how can I change that save directory.
2) When I tried using root permissions (you know, my device is rooted so I used in order to gain access) I couldn't use apt commands anymore. I think some of my ruby gems will require root permissions, so I would like further explanation about it (only if you could of course )
Click to expand...
Click to collapse
1. It saves inside app data, specific folder is /data/data/com.termux/files/usr/var/cache/apt
2. I don't think su works in Termux really, however my root doesn't work right now so I can't really say a definite answer.
TheKindleMCPEGuy said:
1. It saves inside app data, specific folder is /data/data/com.termux/files/usr/var/cache/apt
2. I don't think su works in Termux really, however my root doesn't work right now so I can't really say a definite answer.
Click to expand...
Click to collapse
That's all I had to ask in this thread.
Thanks!
Hello friends!
I am using Termux in order to run ruby.
I installed ruby successfully with "apt" command, and it functions fine.
Current ruby version:
Code:
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [arm-linux-androideabi]
The problem is, I can't really install gems. I tried to install bettercap for the experiment, but it failed. This is what I get:
Code:
$ gem install bettercap
Fetching: colorize-0.8.1.gem (100%)
Successfully installed colorize-0.8.1
Fetching: network_interface-0.0.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161129-14856-1cclchu.rb extconf.rb
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
I found some instructions if I ran "gem help install" but I couldn't really understand what to do in order to fix that.
Can anyone help me to solve this? BTW I have a rooted device so I can use "su" and "sudo" and all that stuff...
Thanks for people who answer~
FurySh0ck said:
Code:
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
Click to expand...
Click to collapse
You can install ruby.h with:
Code:
apt install ruby-dev
.
fornwall said:
You can install ruby.h with: .
Click to expand...
Click to collapse
I installed ruby-dev but it still won't work. It tells me it saved a log file which contains the explanation to the failure. I'll post the whole code, but please pay attention to the last part of it:
Code:
apt install bettercap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bettercap
$ gem install bettercap
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161206-31345-1xerjr9.rb extconf.rb
[*] Running checks for netifaces code...
[*] Warning : this platform as not been tested
checking for getifaddrs()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
/data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1051:in `block in have_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1050:in `have_func'
from extconf.rb:43:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
Any solutions in mind?
BTW Thanks for your time, I appreciate anyone who tries to help.