Build does not work on Linux, "version ‘GLIBC_2.14’ not found"
Information
- Apktool Version (2.2.1) -
- Operating System ((Linux) 64bit CENTOS 6.7) -
- APK From? (Personal APK) -
Stacktrace/Logcat
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4775337926160583738.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 17, --version-code, 910, --version-name, 7.1.1, -F, /tmp/APKTOOL3833096781610913028.tmp, -0, arsc, -0, arsc, -I, /mfw_project/run_data/tmp/apktool/tmp/p/1.apk, -S, /mfw_project/run_data/tmp/apktool/tmp/res, -M, /mfw_project/run_data/tmp/apktool/tmp/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
at brut.androlib.Androlib.buildResources(Androlib.java:412)
at brut.androlib.Androlib.build(Androlib.java:311)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4775337926160583738.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 17, --version-code, 910, --version-name, 7.1.1, -F, /tmp/APKTOOL3833096781610913028.tmp, -0, arsc, -0, arsc, -I, /mfw_project/run_data/tmp/apktool/tmp/p/1.apk, -S, /mfw_project/run_data/tmp/apktool/tmp/res, -M, /mfw_project/run_data/tmp/apktool/tmp/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4775337926160583738.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 17, --version-code, 910, --version-name, 7.1.1, -F, /tmp/APKTOOL3833096781610913028.tmp, -0, arsc, -0, arsc, -I, /mfw_project/run_data/tmp/apktool/tmp/p/1.apk, -S, /mfw_project/run_data/tmp/apktool/tmp/res, -M, /mfw_project/run_data/tmp/apktool/tmp/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
... 6 more
W: /tmp/brut_util_Jar_4775337926160583738.tmp: /tmp/../lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/brut_util_Jar_4775337926160583738.tmp)
Include stacktrace here
Steps to Reproduce
On linux server 1、./apktool/apktool b %s -o %s -p %s" % (DIR_TEMP, DIR_RELEASE + rebuildApkNameUnsigned, DIR_TEMP + '/p/' 2、build will fail
Frameworks
N/A
APK
If this APK can be freely shared, please upload/attach a link to it.
Questions to ask before submission
- Have you tried
apktool d,apktool bwithout changing anything? yes - If you are trying to install a modified apk, did you resign it? yes
- Are you using the latest apktool version? yes
How to fix it without upgrade GLIBC?
How to fix it without upgrade GLIBC?
Apktool leverages a native binary known as aapt which is what is failing in this report. This binary is built from AOSP and if you don't have the needed dependencies with compatible versions there isn't much apktool can do here.
You can check my repo for frameworks_android_base - https://github.com/iBotPeaches/platform_frameworks_base if you want to investigate building a native binary that works everywhere with a different dependency version.
Closing this due to environment problem more than a bug.