./install_compass: Permission denied
时间: 2023-10-17 14:27:23 浏览: 36
如果您在安装Compass时遇到"Permission denied"错误,这意味着您没有足够的权限来执行该操作。您可以尝试以下解决方案:
1. 使用sudo命令:在命令前加上sudo,以获取管理员权限。例如:`sudo ./install_compass`
2. 更改文件权限:使用chmod命令更改文件权限,使其可执行。例如:`chmod +x install_compass`,然后再次尝试运行安装脚本。
3. 确保您有足够的权限:检查当前用户是否具有执行该文件的权限。您可以使用ls -l命令查看文件权限,并确保您具有执行权限。
请注意,这些解决方案可能需要您输入管理员密码或与系统管理员联系以获取更高的权限。
相关问题
为什么会这样[user_mongo@nosql01 replicaset]$ cd /opt [user_mongo@nosql01 opt]$ ll total 0 drwxr-xr-x. 3 root root 25 Mar 16 17:08 servers drwxr-xr-x. 2 root root 51 Mar 16 17:10 software [user_mongo@nosql01 opt]$ tar -zxvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/ mongodb-linux-x86_64-rhel70-4.4.12/LICENSE-Community.txt tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/LICENSE-Community.txt: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/MPL-2 tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/MPL-2: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/README tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/README: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/THIRD-PARTY-NOTICES tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/THIRD-PARTY-NOTICES: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/install_compass tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/install_compass: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongo tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongo: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongod tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongod: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongos tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongos: Cannot open: No such file or directory tar: Exiting with failure status due to previous errors [user_mongo@nosql01 opt]$ tar -zcvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/ tar: Cowardly refusing to create an empty archive Try `tar --help' or `tar --usage' for more information.
根据你提供的信息,出现这种情况可能是因为你没有足够的权限在目标文件夹中创建文件。可以尝试以下解决方法:
1.使用sudo命令运行tar命令,以管理员权限运行。例如:sudo tar -zxvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/
2.检查目标文件夹/opt/servers/mongodb_demo/replicaset/的权限是否正确,可以使用ls -l命令查看。如果权限不足,可以使用chmod命令更改目标文件夹的权限。例如:sudo chmod 755 /opt/servers/mongodb_demo/replicaset/
希望以上解决方法能够帮助到你。
APM编译[ 92/509] Compiling libraries/AP_Compass/AP_Compass_Calibration.cpp报错
您!对于您提到的错误信息,可以尝试以下几种解决办法:
1. 检查代码:查看`AP_Compass_Calibration.cpp`文件中的代码,确保没有语法错误或者其他错误。特别注意检查是否缺少分号、括号不匹配等常见错误。
2. 检查依赖:确认您的编译环境中是否正确安装了所需的库和依赖项。如果缺少某个库,则需要先安装它。
3. 更新编译器:将您使用的编译器更新到最新版本,以确保编译器本身没有问题。
4. 检查配置:检查您的编译配置文件,确保正确地指定了库和依赖项的路径。
5. 查找相关问题:在开发者社区或者论坛上搜索类似的问题,看看是否有其他人遇到过相同的问题并找到了解决方法。
希望以上建议对您有所帮助!如果问题仍然存在,请提供更多详细信息,以便我们能够更准确地帮助您解决问题。