Unsupported record version Unknown-50.49异常

本文介绍了在使用JavaMail实现邮件收发功能时遇到的UnsupportedrecordversionUnknown-50.49异常及其解决方案。该异常仅在发送邮件并启用SSL加密时出现。文中提供了一个简单的方法来屏蔽此异常。

近日使用javamail 为公司的软件添加了邮件收发功能。遇到了Unsupported record version Unknown-50.49异常。

该异常只会在发送邮件的时候产生,而且是应为所有邮箱使用了SSL加密功能。应该是javamail包的问题

初步的解决方案是在你的发送类里 加上props.put("mail.smtp.quitwait", "false");将该异常屏蔽调。

root@ubuntu:/share/valgrind-3.15/valgrind-3.15.0# ./configure --host=arm-unknown-linux-gnueabihf --prefix=/share/valgrind-3.15/valgrind-3.15.0/_install/ checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm-unknown-linux-gnueabihf-strip... arm-unknown-linux-gnueabihf-strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking whether ln -s works... yes checking for arm-unknown-linux-gnueabihf-gcc... arm-unknown-linux-gnueabihf-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-unknown-linux-gnueabihf-gcc accepts -g... yes checking for arm-unknown-linux-gnueabihf-gcc option to accept ISO C89... none needed checking whether arm-unknown-linux-gnueabihf-gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of arm-unknown-linux-gnueabihf-gcc... gcc3 checking how to run the C preprocessor... arm-unknown-linux-gnueabihf-gcc -E checking for arm-unknown-linux-gnueabihf-g++... arm-unknown-linux-gnueabihf-g++ checking whether we are using the GNU C++ compiler... yes checking whether arm-unknown-linux-gnueabihf-g++ accepts -g... yes checking dependency style of arm-unknown-linux-gnueabihf-g++... gcc3 checking for arm-unknown-linux-gnueabihf-ranlib... arm-unknown-linux-gnueabihf-ranlib checking for gcc-ranlib... /usr/bin/gcc-ranlib checking for a sed that does not truncate output... /bin/sed checking for ar... /usr/bin/ar checking for gcc-ar... /usr/bin/gcc-ar checking for perl... /usr/bin/perl checking for gdb... /usr/bin/gdb checking dependency style of arm-unknown-linux-gnueabihf-gcc... gcc3 checking for diff -u... yes checking for arm-unknown-linux-gnueabihf-gcc option to accept ISO C99... none needed checking for a supported version of gcc... ok (12.3.0) checking build system type... x86_64-unknown-linux-gnu checking host system type... arm-unknown-linux-gnueabihf checking for a supported CPU... no (arm) configure: error: Unsupported host architecture. Sorry
最新发布
04-04
<think>嗯,用户在执行Valgrind的configure脚本时遇到了错误,提示不支持的宿主架构。我需要仔细看看用户提供的配置命令和输出日志。 首先,用户运行的命令是: ./configure --host=arm-unknown-linux-gnueabihf --prefix=/share/valgrind-3.15/valgrind-3.15.0/_install/ 然后日志显示检查到host系统类型是arm-unknown-linux-gnueabihf,但最后报错说“Unsupported host architecture. Sorry”。这说明Valgrind可能在3.15.0版本不支持ARM架构。 接下来,我需要确认Valgrind的版本和ARM支持情况。查资料发现,Valgrind在较新的版本中才开始支持ARM,比如3.16或更高。用户用的是3.15.0,可能确实不支持ARM。 另外,用户使用了交叉编译工具链,指定了--host参数,这说明他们可能在x86主机上为ARM目标编译。但Valgrind的configure脚本可能在检测到host是ARM时,发现当前版本不支持,所以报错。 可能的解决方案包括:升级Valgrind到支持ARM的版本,或者检查是否有补丁可以应用。此外,用户可能需要确保交叉编译工具链正确安装,并且所有依赖库也适用于ARM架构。 另外,用户可能混淆了--host和--target参数,但根据configure的输出,host已经正确设置为ARM,所以应该不是参数问题。主要问题还是版本不支持。需要建议用户升级Valgrind版本,或者寻找其他方法在ARM设备上编译。</think>从您提供的配置输出信息来看,编译过程在架构检测阶段失败,具体错误为: $$configure: error: Unsupported host architecture. Sorry$$ 以下是逐步分析及解决方案建议: --- ### 一、错误原因分析 1. **关键参数解读** - `--host=arm-unknown-linux-gnueabihf`:指定目标平台为ARM架构的Linux系统(交叉编译) - `--prefix=...`:设置安装路径 2. **架构兼容性错误** Valgrind 3.15.0版本对ARM架构的支持有限,尤其当使用交叉编译时。输出中明确检测到宿主架构为`arm`: ``` checking host system type... arm-unknown-linux-gnueabihf checking for a supported CPU... no (arm) ``` --- ### 二、解决方案 #### 方案1:升级Valgrind版本 Valgrind在**3.16.0及以上版本**增强了对ARM架构的支持: ```bash # 下载新版(如3.22.0) wget https://sourceware.org/pub/valgrind/valgrind-3.22.0.tar.bz2 tar -xvf valgrind-3.22.0.tar.bz2 cd valgrind-3.22.0 # 重新配置 ./configure --host=arm-unknown-linux-gnueabihf --prefix=/your/install/path ``` #### 方案2:检查交叉编译工具链 确保交叉编译工具链完整且兼容: 1. **验证工具链路径** 确保`arm-unknown-linux-gnueabihf-gcc`和`arm-unknown-linux-gnueabihf-g++`在`$PATH`中: ```bash which arm-unknown-linux-gnueabihf-gcc ``` 2. **安装必要依赖** ARM架构可能需要额外开发库: ```bash sudo apt-get install libc6-dev-armhf-cross ``` #### 方案3:本地编译(可选) 若目标设备是ARM物理机,可尝试直接在设备上编译: ```bash # 移除--host参数 ./configure --prefix=/your/install/path ``` --- ### 三、补充建议 1. **查看官方文档** 参考[Valgrind ARM Support](https://www.valgrind.org/docs/manual/dist.install-platforms.html)确认版本兼容性。 2. **检查补丁文件** 部分旧版Valgrind可通过社区补丁支持ARM,例如: ```bash patch -p1 < arm-support.patch ``` 3. **调试配置过程** 通过`config.log`文件定位具体错误: ```bash tail -n 50 config.log ``` --- ### 四、总结 | 关键问题 | 解决方法 | |------------------|-----------------------------------| | Valgrind版本过低 | 升级到3.16.0+ | | 工具链不完整 | 安装完整的ARM交叉编译工具链 | | 架构支持缺失 | 应用社区补丁或改用本地编译 | 建议优先尝试**升级Valgrind版本**,这是最直接的解决途径。若需进一步调试,请提供`config.log`中的错误片段。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值