While I was trying to Install Android-Studio
and execute the command
#abhinay-Pc:/android-studio/bin$`./studio.sh
It is showing the error:
bash: ./studio.sh: Permission denied
I have already exported Java directory to /android-studio/bin folder`
(Java_Home = /usr/lib/jvm/java-7-oracle)
I have the java-7 installed on my system.
You might not have chmod +x studio.sh try sh ./studio.sh
If this was not it, try again like this: sh -x ./studio.sh. This will show you every line that is run and will help you debug it.
Good luck.
you must change the properties of the studio.sh file and change in the permission to Allow this file to run as program
Related
Im going to use 7za library
now i try to use 7za to extract files and add files from 7z
My problem is that every time i execute nothing happen
Here is my 7z.sh code
and also i set permission and its on /data/local/d
#!/system/bin/sh
export LD_PRELOAD=
umask 000
cd "$1"
shift
/data/local/d/7za "$#"
and in terminal i execute using
su
cd /data/local/d/
sh 7z.sh x -tzip d.zip
And i getting error
Incorrect command line and x : no such file directory
Help me thanks for solution
I want to execute a simple code in Termux(c++) but every time I get an error:
bash: ./test.cpp: Permission denied
Storage permission is on and gcc is installed.
Do I need root or something else?
As molbdnilo said, you should compile your source file first :
g++ test.cpp
And then execute the binary produced (the default name is a.out)
./a.out
Compile and run it in termux's own directory.
Just start termux:
cd storage/
nano test.cpp
g++ test.cpp "./a.out"
You can run it!
C++ can't do it,you must compile first.
And if it Python,you can add #!/usr/bin/env python to first line,and in shell run chmod 744 xxx.py,and then run ./xxx.py.xxx.py is running.
I never used termux but would Like to suggest U following points for compiling
use chmod 777 test.cpp to grant the permission for read write and execute to all users
use g++ along with gcc to compile C++ files
use sudo apt-get update followed by sudo apt-get install g++
compile using g++ test.cpp -o test
and use ./test to execute the file.
This is how it work in Linux systems.
Actual Behavior
Instead of launching, I get a red screen and this error message when launching a react native projects from scratch: Cannot Find entry file index.ios.js in any of the project roots ["/Users/neo/newProjects/F2"]
Expected behavior
Launch of a clean app starter
What I am trying to do
I'm trying to init and run a react-native project from scratch in the android and ios simulator, but I'm getting the following error.
What I have tried
I've tried doing the following:
Install via documentation
Moving through the install steps outlined here several times:
https://facebook.github.io/react-native/docs/getting-started.html
NPM Install
Performing NPM Install from within the project folder
Editing .profiles ( android )
editing the ~.profiles file, to set the android home variable.. this is what it looks like now:
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" $
export ANDROID_HOME=${HOME}/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools`
Npm start
Running npm start and checking activity on the port, ( was the package manager running )
checking the port for activity
( forget how, verified its available )
Code that worked for someone...
I have also tried running this code in the terminal
react-native bundle \
--entry-file=index.ios.js \
--platform=ios \
--dev=false \
--assets-dest=./production/ios \
--bundle-output=./production/ios/ios.jsbundle
After reviewing this article https://github.com/facebook/react-native/issues/8664
And got this error message:
ENOENT: no such file or directory, open './production/ios/ios.jsbundle'
I noticed this suggestion
rerunning npm install and rnpm link
I tried running rnpm link, but got "no such command found"
after reading this article
Entry file error in react native from packager
In the same article I saw this:
"Figured out that after updating to RN 0.28 my app is spitting this issue due to incompatible dependencies. This is how I solved this problem"
rm -rf node_modules
npm cache clean
Then open package.json except react-native change all package versions to *
Then run
npm update --save
npm update --save-dev
Check package if package.json is updated with version numbers, if not verify from npmjs and update manually
Delete app from the device and try to run again
But I cannot discern what the advisor is doing here... and the logic behind it... if it seems relevant, can someone comment on this?
Terminal Output
I am getting this in the terminal:
Loading dependency graph, done.
error: bundling: Error
at DependencyGraph._getAbsolutePath
(/Users/neo/newProjects/F2/node_modules/react-native/packager/src/node-haste/index.js:272:11)
at DependencyGraph.getDependencies (/Users/neo/newProjects/F2/node_modules/react-native/packager/src/node-haste/index.js:216:26)
at Resolver.getDependencies (/Users/neo/newProjects/F2/node_modules/react-native/packager/src/Resolver/index.js:106:27)
at _resolverPromise.then.resolver (/Users/neo/newProjects/F2/node_modules/react-native/packager/src/Bundler/index.js:561:62)
at process._tickCallback (internal/process/next_tick.js:109:7)
Bundling `index.ios.js` 0.0% (0/1), failed.
Versions
Node v7.9.0
react-native-cli: 2.0.1
react-native: 0.44.0
Homebrew 1.2.0
Just updated xcode
OSX 10.11.6 (15G1004)
What I notice
I notice that it seems to be looking in this file.. ["/Users/neo/newProjects/F2"] whereas in some locations on my machine the files are organized Users/Neo/... ( capital username ) ... and I sense that has something to do with this.
also, on project build it does throw this warning... not sure what it means...
"react-native#0.44.0" has unmet peer dependency "react#16.0.0-alpha.6"
Any suggestions or ideas?
update
tried changing directories out of the users folder and initializing
here is what I got in the stacktrace
2017-05-02 09:25:21.478 xcodebuild[52491:5334564] Error saving log: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSFilePath=/code/F4/ios/build/Logs/Build/B9E13558-CCE5-4451-AC21-7E643189BF7B.xcactivitylog, NSLocalizedDescription=No such file or directory} | User info: {
NSFilePath = "/code/F4/ios/build/Logs/Build/B9E13558-CCE5-4451-AC21-7E643189BF7B.xcactivitylog";
NSLocalizedDescription = "No such file or directory";
}
Installing build/Build/Products/Debug-iphonesimulator/F4.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/F4.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Also, tried installing expo and running from there...
Heres what the terminal shows
Error sourcing shell startup scripts: /Users/neo/.bash_profile: line 2: rbenv: command not found
/Users/neo/.bash_profile: line 4: rbenv: command not found
/Users/neo/.bash_profile: line 5: rbenv: command not found
/Users/neo/.bash_profile: line 7: rbenv: command not found
/Users/neo/.bash_profile: line 9: rbenv: command not found
/bin/bash: shell_session_update: command not found
.
Please run npm install -g exp && exp path``
10:25:22 AM
Starting React Native packager...
10:25:31 AM
Scanning 656 folders for symlinks in /code/my-new-project/node_modules (11ms)
10:25:32 AM
Loading dependency graph.
10:25:32 AM
Running packager on port 19001.
10:25:32 AM
10:25:37 AM
Dependency graph loaded.
10:25:51 AM
Project opened! You can now use the "Send Link" or "Device" buttons to view your project.
10:36:58 AM
Couldn't start project on Android: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
`
I downloaded dex2jar and now trying to use it, but if I type 'sh d2j-dex2jar.sh' it shows the following message.
d2j-dex2jar.sh: line 36: ./d2j_invoke.sh: Permission denied
At first I thought that the permission was denied because the programme required the root permission, so I also tried adding 'sudo' to the command, and it did not work either. How should I solve this problem?
You need to provide execute permissions to your sh script.
To do that : sudo chmod +x d2j_invoke.sh
Still If you find no luck use,
chmod a+x *.sh
I am unable to build helloWorld sample to get .so to run it in eclipse. I have imported project successfully and changed variable to my root path as required. this is my build_native.sh. I am pasting the only change I made in that file
NDK_ROOT_LOCAL=/cygdrive/e/android-ndk-r8
COCOS2DX_ROOT_LOCAL=/cygdrive/e/cocos2d
And my NDK is working fine because I have executed HelloWorld sample of NDK successfully. My SDK version is 20 and NDK version is 8 and I am using cygwin above than 1.7.. I have executed the chown on my NDK directory.. But when I run the command ./build_native.sh in HelloWorld sample program for cocos2d I get this error
E:/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm- linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/png.a: No such file: Permission denied
collect2: ld returned 1 exit status
and when I search for png.a in my NDK directory window can't locate that file. I am confused whether it's a permission error or File isn't there. But I have the latest NDK if file isn't there how come anyone will able to run cocos2d-x??? Need Help!!!
It seems like the permissions on built files were missing when I tried as well.
$ ls -l obj/local/armeabi/png.a
---------- 1 someuser Domain Users 912618 Jul 12 18:23 obj/local/armeabi/png.a
There is a link suggested on the forum which doesn't seem to be accessible right now.
Anyway, to fix, you can set the permission on the files.
$ cd obj/local/armeabi/
$ chmod 664 *.a
$ cd ../../..
Edit: A better fix may be to set the default permissions in /etc/fstab to
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
Following this, you should be able to run ./build_native.sh.
A command you could use to locate all files below the current directory which have no (read/write) permission available on them is find . -type f -perm 0
See this answer to set write permissions on all files below your working directory.
Consider going through a tutorial on chmod to understand the concept of permissions in linux/unix in case you're unfamiliar with them.