因BLAS从gfortran到GCC安装

论坛 期权论坛     
选择匿名的用户   2021-5-21 15:47   123   0
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<p><span style="font-size:14px">背景知识:我不是root权限,因此安装包比较痛苦,因此安装时都将包指定到某个目录。</span></p>
<p><span style="font-size:14px">目标:我想安装gfortran,因为BLAS需要它编译,安装gfortran不想通过编译源文件方法,就</span></p>
<p><span style="font-size:14px">1:直接下载二进制文件(https://gcc.gnu.org/wiki/GFortranBinaries)</span></p>
<p><span style="font-size:14px">2:解压后,按道理说可以直接用,因为是二进制文件。</span></p>
<p><span style="font-size:14px">3::配置环境变量,我的是:</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">if [ -z &#34;$LD_LIBRARY_PATH&#34; ];</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px"> then</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">        LD_LIBRARY_PATH&#61;&#34;/home/wuxupeng/gcc-infrastructure/gcc-4.3/lib64&#34;</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">else</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">        LD_LIBRARY_PATH&#61;&#34;/home/wuxupeng/gcc-infrastructure/gcc-4.3/lib64:$LD_LIBRARY_PATH&#34;</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">fi</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">export PATH&#61;/home/wuxupeng/gcc-infrastructure/gcc-4.3/bin:$PATH</span></p>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
  <p><span style="font-size:14px">export LD_LIBRARY_PATH</span></p>
</blockquote>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<p><span style="font-size:14px">果然可以用,<strong>但是编译BLAS时出现什么什么.SO文件找不到</strong>。</span></p>
<p><span style="font-size:14px">4:既然找不到,我就网上搜这些包,可是找不到,无奈矛头指向GCC编译器,我就想安装版本高的GCC。</span></p>
<p><span style="font-size:14px">5:安装GCC需要需要依赖一些包:</span></p>
<p><span style="font-size:14px">#############################################################################################</span></p>
<p><span style="font-size:14px"></span></p>
<div class="article_title" style="margin:5px 0px; line-height:30px; font-family:&#39;Microsoft YaHei&#39;">
  <span style="font-size:20px"> </span>
  <h1 style="margin:0px; padding:0px; display:inline; font-weight:normal; vertical-align:middle"> <span class="link_title"><span style="font-size:14px"><a href="http://blog.csdn.net/e_wsq/article/details/25568867" rel="noopener noreferrer" style="color:rgb(0,0,0); text-decoration:none" target="_blank">GCC 4.8.2 编译安装小记</a>(参考http://blog.csdn.net/e_wsq/article/details/25568867)</span></span></h1>
</div>
<p></p>
<p><span style="font-size:14px"></span></p>
<div class="article_title" style="margin:5px 0px; font-size:20px; line-height:30px; font-family:&#39;Microsoft YaHei&#39;">
  <span style="color:rgb(51,51,51); font-family:微软雅黑,Verdana,sans-serif,宋体; font-size:13px; letter-spacing:0.5px; line-height:22.5px; text-align:right">以前从没有升级过GCC,一直用系统默认的GCC版本,最近在研究好久没有用过的 C, 便有了升级GCC的想发,大致如下。</span>
</div>
<p></p>
<p><span style="font-size:14px"></span></p>
<div class="article_content" id="article_content" style="margin:20px 0px 0px; line-height:26px; font-family:Arial; color:rgb(51,51,51)">
  <p style="font-size:13px; padding-top:0px; padding-bottom:0px; margin-top:8px; margin-bottom:8px; line-height:22.5px; letter-spacing:0.5px; font-family:微软雅黑,Verdana,sans-serif,宋体"> 环境: <span style="padding:0px; margin:0px; color:rgb(0,153,0)">CentOS-6.5-i386 , gcc-4.4</span><span style="padding:0px; margin:0px; color:rgb(0,153,0)">.7 系统必须已经安装有一个编译器,因为 gcc 也是需要编译的</span></p>
</div>
<p></p>
<p><span style="font-size:14px"></span></p>
<div class="article_content" id="article_content" style="margin:20px 0px 0px; line-height:26px; font-family:Arial; color:rgb(51,51,51)">
  <p style="font-size:13px; padding-top:0px; padding-bottom:0px; margin-top:8px; margin-bottom:8px; line-height:22.5px; letter-spacing:0.5px; font-family:微软雅黑,Verdana,sans-serif,宋体"> 首先 gcc 编译需要三个额外库,下载并按照下面的顺序安装它们,如下:</p>
</div>
<p></p>
<p><span style="font-size:14px"></span></p>
<div class="article_content" id="article_content" style="margin:20px 0px 0px; line-height:26px; font-family:Arial; color:rgb(51,51,51)">
  <p style="font-size:13px; padding-top:0px; padding-bottom:
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP