linux下執行打包命令時出現error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory時,
[root@iZ23hdndo4vZ test]# java -jar /home/pkgapps/apktool/apktool.jar b /home/pkgapks/apkfolder/ryszp -o /home/pkgapks/outapks/ryszp/2016-05-12/ryszp_HW_TEST01_unsign.apk
I: Using Apktool 2.0.1-1833a0-SNAPSHOT
I: Checking whether resources has changed...
I: Building resources...
/tmp/brut_util_Jar_8038846901617459343.tmp: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_8038846901617459343.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --version-code, 35,
--version-name, 1.9, -F, /tmp/APKTOOL7096845086765029255.tmp, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /home/pkgapks/apkfolder/ryszp/res, -M, /home/pkgapks/apkfolder/ryszp/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:475)
at brut.androlib.Androlib.buildResources(Androlib.java:413)
at brut.androlib.Androlib.build(Androlib.java:301)
at brut.androlib.Androlib.build(Androlib.java:269)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_8038846901617459343.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --version-code, 35, --version-name, 1.9, -F, /tmp/APKTOOL7096845086765029255.tmp,
-0, arsc, -I, /root/apktool/framework/1.apk, -S, /home/pkgapks/apkfolder/ryszp/res, -M, /home/pkgapks/apkfolder/ryszp/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:461)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_8038846901617459343.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --version-code, 35, --version-name, 1.9, -F, /tmp/APKTOOL7096845086765029255.tmp, -0, arsc, -I, /root/apktool/framework/1.apk,
-S, /home/pkgapks/apkfolder/ryszp/res, -M, /home/pkgapks/apkfolder/ryszp/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 6 more
[root@iZ23hdndo4vZ test]# cd /usr/lib
[root@iZ23hdndo4vZ lib]# yum whatprovides libstdc++.so.6
Loaded plugins: security
libstdc++-4.4.7-16.el6.i686 : GNU Standard C++ Library
Repo : base
Matched from:
Other : libstdc++.so.6
[root@iZ23hdndo4vZ lib]# yum install libstdc++-4.4.7-16.el6.i686
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libstdc++.i686 0:4.4.7-16.el6 will be installed
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: libstdc++-4.4.7-16.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_4.2.0) for package: libstdc++-4.4.7-16.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: libstdc++-4.4.7-16.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: libstdc++-4.4.7-16.el6.i686
--> Processing Dependency: libgcc_s.so.1 for package: libstdc++-4.4.7-16.el6.i686
--> Running transaction check
---> Package libgcc.i686 0:4.4.7-16.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
libstdc++ i686 4.4.7-16.el6 base 302 k
Installing for dependencies:
libgcc i686 4.4.7-16.el6 base 114 k
Transaction Summary
====================================================================================================================================
Install 2 Package(s)
Total download size: 416 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): libgcc-4.4.7-16.el6.i686.rpm | 114 kB 00:00
(2/2): libstdc++-4.4.7-16.el6.i686.rpm | 302 kB 00:00
------------------------------------------------------------------------------------------------------------------------------------
Total 313 kB/s | 416 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libgcc-4.4.7-16.el6.i686 1/2
/sbin/ldconfig: /usr/lib/libz.so.1 is not a symbolic link
Installing : libstdc++-4.4.7-16.el6.i686 2/2
/sbin/ldconfig: /usr/lib/libz.so.1 is not a symbolic link
Verifying : libgcc-4.4.7-16.el6.i686 1/2
Verifying : libstdc++-4.4.7-16.el6.i686 2/2
Installed:
libstdc++.i686 0:4.4.7-16.el6
Dependency Installed:
libgcc.i686 0:4.4.7-16.el6
Complete!