*** 没有规则可以创建目标“/root/openssl-1.1.1c/lib”。 停止。
时间: 2023-12-28 09:04:14 浏览: 24
这个错误提示意味着您没有足够的权限来创建目标目录。在Linux系统中,/root目录通常是只有root用户才有权限访问和修改的。您需要使用root用户或者具有sudo权限的用户才能在该目录下创建文件或目录。
您可以尝试使用sudo命令来运行您的命令,例如:
sudo make install
这将使用sudo权限来运行make install命令,从而具有足够的权限来创建目标目录。
相关问题
make depend && make _all make[1]: Entering directory '/opt/openssl-1.1.1/openssl-1.1.1' make[1]: Leaving directory '/opt/openssl-1.1.1/openssl-1.1.1' make[1]: Entering directory '/opt/openssl-1.1.1/openssl-1.1.1' arm-none-linux-gnueabihf -I. -Iinclude -fPIC -pthread -Wall -O3 -fomit-frame-pointer -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/openssl-1.1.1/openssl-1.1.1/_install/ssl\"" -DENGINESDIR="\"/opt/openssl-1.1.1/openssl-1.1.1/_install/lib/engines-1.1\"" -DNDEBUG -c -o apps/app_rand.o apps/app_rand.c /bin/sh: 1: arm-none-linux-gnueabihf: not found Makefile:720: recipe for target 'apps/app_rand.o' failed make[1]: *** [apps/app_rand.o] Error 127 make[1]: Leaving directory '/opt/openssl-1.1.1/openssl-1.1.1' Makefile:169: recipe for target 'all' failed make: *** [all] Error 2如何解决该错误
这个错误通常是由于交叉编译器路径设置错误导致的。可以尝试以下几个步骤来解决这个问题:
1. 确认交叉编译器是否已经正确安装,并且路径是否添加到了环境变量中。可以在终端中执行 `arm-none-linux-gnueabihf-gcc --version` 来确认交叉编译器是否能够正常使用。
2. 检查Makefile文件中的交叉编译器路径是否正确。可以使用文本编辑器打开Makefile文件,查找 `CROSS_COMPILE` 或者 `CC` 字段,确认路径是否正确。
3. 可以尝试在终端中手动执行编译命令,例如 `arm-none-linux-gnueabihf-gcc -I. -Iinclude -fPIC -pthread -Wall -O3 -fomit-frame-pointer -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/openssl-1.1.1/openssl-1.1.1/_install/ssl\"" -DENGINESDIR="\"/opt/openssl-1.1.1/openssl-1.1.1/_install/lib/engines-1.1\"" -DNDEBUG -c -o apps/app_rand.o apps/app_rand.c`,如果能够正常执行,则可以确认交叉编译器路径设置正确。
4. 如果以上方法都无法解决问题,可以考虑重新安装交叉编译器,并确认路径设置正确。
QT5.12.12 ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && libs.openssl' failed. 已经设置 OPENSSL_PREFIX=/home/dev/work/qt-sources/build/openssl-1.1.1s \ OPENSSL_LIBS='-lcrypto -lssl' \ OPENSSL_INCDIR=/home/dev/work/qt-sources/build/openssl-1.1.1s/include \ OPENSSL_LIBDIR=/home/dev/work/qt-sources/build/openssl-1.1.1s/lib \
根据你提供的信息,你已经设置了 OpenSSL 的路径和库信息,但是仍然遇到了相同的错误。这可能是因为 QT 配置过程中没有正确识别 OpenSSL 的库和头文件路径,或者 OpenSSL 版本不兼容。
你可以尝试在 configure 命令中明确指定 OpenSSL 的库和头文件路径,方法是使用 -openssl-linked 选项,并在其后加上正确的路径信息。例如:
```
./configure -openssl-linked OPENSSL_PREFIX=/home/dev/work/qt-sources/build/openssl-1.1.1s OPENSSL_LIBS='-lcrypto -lssl' OPENSSL_INCDIR=/home/dev/work/qt-sources/build/openssl-1.1.1s/include OPENSSL_LIBDIR=/home/dev/work/qt-sources/build/openssl-1.1.1s/lib
```
如果仍然无法解决问题,可以尝试更新 OpenSSL 到最新版本,并重新编译 QT。如果你已经使用最新版本的 OpenSSL,可能需要查看 QT 的版本是否与 OpenSSL 兼容。QT5.12.12 可以使用 OpenSSL 1.1.1 系列的版本,建议使用这个版本进行编译。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)