While initializing the repo to download Android Source Code using the following command -
repo init -u git://android.git.kernel.org/platform/manifest.git
I'm getting the following error -
Traceback (most recent call last):
File "/home/pritamn/bin/repo", line 603, in <module>
main(sys.argv[1:])
File "/home/pritamn/bin/repo", line 570, in main
_Init(args)
File "/home/pritamn/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/pritamn/bin/repo", line 213, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1201, in _execute_child
raise child_exception
Can anybody please help me in pin-pointing the exact cause of this error?
You must have git installed for that command to work
Do you have git installed? Make sure it's installed by typing "git" on the command line.
Running on Win7 64bit I had to add "C:\Program Files (x86)\Git\bin" to my PATH in order for this to work.
I had this happen to me, you need to apt-get remove git-core and re-install it using apt-get install git-core.
Related
Getting errors as below, when I follow step 4 of the instruction from Getting Started with ARC Open Source on Linux. OS is Ubuntu 14.04 LTS running in Hyper-V.
UBUNTU14:~/arc$ ./configure
ERROR:root:While running
['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python'] ERROR:root:GSResponseError:
status=403, code=None, reason=Forbidden.
ERROR:root:Try prodaccess, and if it does not solve the problem try rm
~/.devstore_token ###STEP_WARNINGS### ERROR:root:Retrying after 9 s
sleeping Traceback (most recent call last): File
"/home/fkiller/arc/src/build/build_common.py", line 938, in wrapper
return func(*args, **kwargs) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 243,
in _download_package_with_retries
self._download_method(url, download_package_path) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 119,
in _download
build_common.get_gsutil_executable(), 'cp', url, destination_path]) File
"/home/fkiller/arc/src/build/util/download_package_util.py", line 97,
in execute_subprocess
output = subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT) File "/usr/lib/python2.7/subprocess.py",
line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command
'['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python']' returned non-zero exit status 1
Any idea to resolve this without changing build script? I may manually pointing python.zip from other sources such as https://naclports.storage.googleapis.com/builds/pepper_40/trunk-147-g49eb4c9/publish/python/pnacl/python.zip, but I want to build it as is without changing scripts.
I've already tried to setup gsutil and its authenticator, but it didn't fix the issue.
EDIT: After #elijah-taylor fixed ACL, now I'm getting errors below
Traceback (most recent call last): File "src/build/configure.py",
line 365, in
sys.exit(main()) File "src/build/configure.py", line 347, in main
_gclient_sync_third_party() File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename)) File
"/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception OSError: [Errno 2] No such file or directory
In the line 132,
File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename))
gclient_filename is "third_party/.gclient" and os.path.dirname(gclient_filename) is "thrid_party".
The problem was bad ACLs on the files. I reached out to #elijah-taylor for a fix, it should now work!
faced same issue..fixed after running the following.
apt-get install gsutil
apt-get install libwww-perl
chmod +x ./third_party/tools/depot_tools/third_party/gsutil/gsutil
I'm currently trying to run the systrace python script that is included in the platform-tools folder and I'm getting the following error:
File "systrace.py", line 274, in <module>
main()
File "systrace.py", line 60, in main
device_sdk_version = get_device_sdk_version()
File "systrace.py", line 44, in get_device_sdk_version
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'M running on Ubuntu 12.04 LTS. Here is the command I'm using to run systrace:
sudo python systrace.py -o output.html
NOTE: The sudo is in order to avoid the following error:
File "systrace.py", line 274, in <module>
main()
File "systrace.py", line 63, in main
os.execv(legacy_script, sys.argv)
OSError: [Errno 13] Permission denied
After doing some searching around the web I found that one solution was to add the adb to my PATH variable. I added the platform-tools directory to my PATH and I'm still getting the same error. I went ahead to check the code that is causing the problem and apparently its this snippet:
adb = subprocess.Popen(getprop_args, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
where getprop_args is defined as follows:
getprop_args = ['adb', 'shell', 'getprop', 'ro.build.version.sdk']
From what I understand the code is trying to run the following command:
adb shell getprop ro.build.version.sdk
I ran the command in console and it work with no problem. I also copied both lines of code and ran them in python interpreter and it ran without a problem. I really don't know how to solve this issue. Does anyone know of a possible solution?
Ok so I found out what the problem was. The problem was the sudo that I was putting right before python systrace.py -o output.html I didn't know but I guess the PATH variable is different when using sudo, than when not using it. So the PATH in sudo didn't have the platform-tools directory. So I removed the sudo and I was getting the following error:
File "systrace.py", line 274, in <module>
main()
File "systrace.py", line 63, in main
os.execv(legacy_script, sys.argv)
OSError: [Errno 13] Permission denied
To solve this problem I ran the following command on the legacy_script:
$chmod +x ./systrace-legacy.py
And now I was able to run the systrace script without a problem :P
this problem is causing by PATH. adb path should put the end of the other path.
for example:
$ sudo gedit /etc/environment;
PATH="...:~/softAddr/adt-bundle-linux-x86_64-20140624/sdk/platform-tools:~/softAddr/adt-bundle-linux-x86_64-20140624/sdk/tools"
not:
PATH="~/softAddr/adt-bundle-linux-x86_64-20140624/sdk/platform-tools:~/softAddr/adt-bundle-linux-x86_64-20140624/sdk/tools:..."
I am trying to build unmodified Chromium following official instructions, but i am getting the following error, I tried reinstalling Ubuntu 8, 12 but no difference:
[10/6591] ACTION Creating jsr_305_javalib jar
FAILED: cd ../../third_party/jsr-305; python ../../build/android/jar.py "--classes-dir=../../out/Release/gen/jsr_305_javalib/classes" "--jar-path=../../out/Release/lib.java/jsr_305_javalib.jar" "--excluded-classes=\"*/R.class\" \"*/R##*.class\"" "--ignore=035ff3d8153c7ebb3e17803d6ec654de -"
Traceback (most recent call last):
File "../../build/android/jar.py", line 53, in <module>
sys.exit(main(sys.argv))
File "../../build/android/jar.py", line 46, in main
DoJar(options)
File "../../build/android/jar.py", line 30, in DoJar
subprocess.check_call(jar_cmd, cwd=jar_cwd)
File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'd stopped at same error. Finally, I found my stupid mistake that I forgot to add PATH of jar command. The following command is needed in addition to the java set up guide in Chromium official build instructions.
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_xx/bin/jar 50000
You must install the depot_tools package. Try this commands;
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/path/to/depot_tools
I've followed the instructions Google has provided on downloading the Source Tree, but after I run the command
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
and I receive the following error message :
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
Traceback (most recent call last):
File "/Users/roboguy12/bin/repo", line 690, in <module>
main(sys.argv[1:])
File "/Users/roboguy12/bin/repo", line 657, in main_Init(args)
File "/Users/roboguy12/bin/repo", line 189, in _Init_CheckGitVersion()
File "/Users/roboguy12/bin/repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
What did I do wrong? Or is this just an error on behalf of Repo?
UPDATE: Now that I've installed Python 2.7, I still have almost the exact same error message:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
Traceback (most recent call last):
File "/Users/roboguy12/bin/repo", line 690, in <module>
main(sys.argv[1:])
File "/Users/roboguy12/bin/repo", line 657, in main_Init(args)
File "/Users/roboguy12/bin/repo", line 189, in _Init_CheckGitVersion()
File "/Users/roboguy12/bin/repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I call $ python -V and it says Python 2.7.1, so I don't know what else I can do.
Seems to me you might have not done a couple of things: chmod'd the repo to +x and/or put it in your $PATH statement as the first directory to look for (and could be using another version of repo). Have you tried 'ls -al' instead? The directory you're looking for is hidden and you need the -a argument in ls to view hidden files/directories.
UPDATE: Ah, just saw your update. Since you're using a Mac, you need to use Python 2.7. To do so, you'll need to MacPort it. This website provided much help to me: INSTALLING PYTHON 2.7, EASY_INSTALL, PIP, VIRTUALENV AND VIRTUALENVWRAPPER ON MAC OS X
I am new to Android. I wanted take a look at the Andriod source and started the download process. I am having a problem in initialising the repo. I am getting a below error:
$ repo init -u https://android.googlesource.com/platform/manifest
Traceback (most recent call last):
File "/bin/repo", line 685, in <module>
main(sys.argv[1:])
File "/bin/repo", line 652, in main
_Init(args)
File "/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/bin/repo", line 209, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
You need to install git. The typical command would be :
$ sudo apt-get install git-core