Termux权限被拒绝
Termux permission denied
我想在Termux(c++(中执行一个简单的代码,但每次我都会遇到错误:
bash: ./test.cpp: Permission denied
Storage permission is on and gcc is installed.
我需要根还是其他什么?
正如molbdnilo所说,您应该首先编译源文件:
g++ test.cpp
然后执行生成的二进制文件(默认名称为a.out(
./a.out
在termux自己的目录中编译并运行它。刚开始termux:
cd storage/
nano test.cpp
g++ test.cpp "./a.out"
你可以运行它!
C++做不到,必须先编译。如果是Python,您可以将#!/usr/bin/env python
添加到第一行,并在shell中运行chmod 744 xxx.py
,然后运行./xxx.py
.xxx.py。
我从未使用termux,但我想建议U以下几点用于编译
- 使用
chmod 777 test.cpp
向所有用户授予读写和执行权限 - 将g++与gcc一起使用来编译C++文件使用
sudo apt-get update
,然后使用sudo apt-get install g++
- 使用
g++ test.cpp -o test
编译并使用CCD_ 8来执行该文件。这就是它在Linux系统中的工作方式
相关文章:
- Termux权限被拒绝
- AWS Lambda C++运行时权限被拒绝
- 为什么 KMS drmModeSetCrtc() 在 X11 会话中运行时会失败并被拒绝权限?
- 使用崇高文本 3 进行C++拒绝授予权限?
- 安卓inotify_add_watch失败:权限被拒绝?
- clang --版本权限被拒绝错误
- 为什么 mkdir() 后跟 ofstream::operator<< 失败并被拒绝权限?
- QSSLSLSOCKETS无法解决和权限拒绝错误
- 运行简单 c++ 程序时出现权限被拒绝错误
- Apache HTTPD模块共享内存权限拒绝了错误
- CLION无法打开输出文件,拒绝了权限
- 无法打开输出文件___.exe:权限被拒绝
- 写入文件权限被拒绝
- .out 使用 -c 指令和 g++ 拒绝权限
- 当我使用 remove() 时权限被拒绝
- Linux 拒绝使用 boost asio 的套接字绑定权限
- 获取错误 - 启用权限后,OpenProcess() 中的访问被拒绝
- 连接到Boost.Asio创建的域套接字时权限被拒绝
- 无法打开输出文件:binDebugPrimeChecker.exe权限被拒绝
- 在Linux中拒绝权限