<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Skillset on Cole World</title><link>https://blog.colemei.com/tags/skillset/</link><description>Recent content in Skillset on Cole World</description><generator>Hugo -- 0.150.1</generator><language>en</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Sat, 10 Jul 2021 16:47:33 +0800</lastBuildDate><atom:link href="https://blog.colemei.com/tags/skillset/index.xml" rel="self" type="application/rss+xml"/><item><title>Running Pentaho Data Integration on Mac bigSur (M1)</title><link>https://blog.colemei.com/posts/running-pentaho-data-integration-on-mac-bigsur-m1/</link><pubDate>Sat, 10 Jul 2021 16:47:33 +0800</pubDate><author>Cole Mei</author><guid>https://blog.colemei.com/posts/running-pentaho-data-integration-on-mac-bigsur-m1/</guid><description>&amp;lt;no value&amp;gt;</description><enclosure url="https://blog.colemei.com/110-1920x1080_5502438842526969188.jpg" length="" type="image/jpeg"/><media:thumbnail url="https://blog.colemei.com/110-1920x1080_5502438842526969188.jpg" width="1920" height="1080"/><media:content url="https://blog.colemei.com/110-1920x1080_5502438842526969188.jpg" medium="image" type="image/jpeg" width="1920" height="1080"><media:title type="html">/110-1920x1080_5502438842526969188.jpg</media:title></media:content><content type="text/html" mode="escaped"><![CDATA[<h1 id="关于在m1-mac-上安装部署pdikettle">关于在M1 Mac 上安装部署PDI(kettle)<a href="#%e5%85%b3%e4%ba%8e%e5%9c%a8m1-mac-%e4%b8%8a%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2pdikettle" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h1>
<ul>
<li>
<h2 id="前言">前言<a href="#%e5%89%8d%e8%a8%80" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<p>截止我编写这篇笔记之时，Kettle并没有原生支持M1，所以本文大致思路是使用Rosetta转译运行，无需借助任何虚拟机。</p>
</li>
<li>
<h2 id="安装步骤">安装步骤<a href="#%e5%ae%89%e8%a3%85%e6%ad%a5%e9%aa%a4" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<ol>
<li>
<h3 id="配置rosetta-terminal强制在intel模式下运行shell">配置Rosetta Terminal（强制在Intel模式下运行shell）<a href="#%e9%85%8d%e7%bd%aerosetta-terminal%e5%bc%ba%e5%88%b6%e5%9c%a8intel%e6%a8%a1%e5%bc%8f%e4%b8%8b%e8%bf%90%e8%a1%8cshell" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h3>
<blockquote>
<p>参考 <a href="https://cutecoder.org/software/run-command-line-apple-silicon/">https://cutecoder.org/software/run-command-line-apple-silicon/</a></p></blockquote>
<ol>
<li>
<p>打开Terminal终端的 <strong>偏好设置</strong> → <strong>描述文件</strong></p>
</li>
<li>
<p>从左侧选择一个你喜欢的shell → 下方省略号 → <strong>复制描述文件</strong></p>
</li>
<li>
<p>点击新的描述文件 给它起一个好听的名字 就像“Rosetta Shell”</p>
</li>
<li>
<p>右侧点击 <strong>窗口</strong> 再给它起一个好听的标题 就像“Terminal (Intel)”</p>
</li>
<li>
<p>点击 <strong>shell</strong> 运行命令处写入以下 并取消勾选 <strong>在shell中运行</strong></p>
<p><code>env</code> <code>/usr/bin/arch</code> <code>-x86_64 ``/bin/zsh</code> <code>--login</code></p>
</li>
<li>
<p>(可选) 将该shell设置为默认</p>
</li>
</ol>
</li>
<li>
<h3 id="安装-homebrew">安装 Homebrew<a href="#%e5%ae%89%e8%a3%85-homebrew" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h3>
<blockquote>
<p>在arm64架构中 我们需要做两种Homebrew的安装</p>
<blockquote>
<p>/usr/local/homebrew —— 服务于传统intel安装路径</p>
<p>/opt/homebrew —— 服务于已原生支持Apple Silicon的包</p></blockquote></blockquote>
<ol>
<li>
<p>打开刚配置好的Rosetta Shell</p>
</li>
<li>
<p>输入以下几行命令：</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nb">cd</span> /usr/local
</span></span><span class="line"><span class="cl">sudo mkdir homebrew
</span></span><span class="line"><span class="cl">sudo chgrp admin homebrew
</span></span><span class="line"><span class="cl">sudo chmod g+rwx homebrew
</span></span><span class="line"><span class="cl">curl -L https://github.com/Homebrew/brew/tarball/master <span class="p">|</span> tar xz --strip <span class="m">1</span> -C homebrew
</span></span></code></pre></div></li>
<li>
<p>在 ～/.zshrc 中加入如下行，来自动选择运行何种homebrew的安装模式</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="k">if</span> <span class="o">[</span> <span class="s2">&#34;</span><span class="k">$(</span>sysctl -n sysctl.proc_translated<span class="k">)</span><span class="s2">&#34;</span> <span class="o">=</span> <span class="s2">&#34;1&#34;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">    <span class="nb">local</span> <span class="nv">brew_path</span><span class="o">=</span><span class="s2">&#34;/usr/local/homebrew/bin&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">else</span>
</span></span><span class="line"><span class="cl">    <span class="nb">local</span> <span class="nv">brew_path</span><span class="o">=</span><span class="s2">&#34;/opt/homebrew/bin&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">brew_path</span><span class="si">}</span><span class="s2">:</span><span class="si">${</span><span class="nv">PATH</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span></code></pre></div><p>记得 <code> source ~/.zshrc</code> 哦～</p>
</li>
</ol>
</li>
<li>
<h3 id="配置-java环境">配置 java环境<a href="#%e9%85%8d%e7%bd%ae-java%e7%8e%af%e5%a2%83" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h3>
<blockquote>
<p>这里需要对应Kettle和JDK 版本的对应关系 非常严格</p>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/01.png" alt=""></p>
<p>如果已经安装了其他版本JDK 关于mac上的多版本Java管理</p>
<p>请参考 <a href="https://blog.csdn.net/qq_39992641/article/details/117048076">https://blog.csdn.net/qq_39992641/article/details/117048076</a></p></blockquote>
<ol>
<li>
<p>打开Rosetta shell 输入如下命令</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew tap AdoptOpenJDK/openjdk
</span></span><span class="line"><span class="cl">brew install adoptopenjdk8 
</span></span></code></pre></div></li>
<li>
<p>安装完成后 查看java版本</p>
</li>
</ol>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/02.png" alt="查看java版本"></p>
<p>如图就成功了 我采用的是<strong>kettle9.1 + jdk8</strong></p>
<p>所以 version 一定是要 <strong>1.8.xxx</strong>  还请注意自己的版本对应关系</p>
</li>
<li>
<h3 id="下载kettle">下载Kettle<a href="#%e4%b8%8b%e8%bd%bdkettle" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h3>
<blockquote>
<p>官方下载地址：https://sourceforge.net/projects/pentaho/files/</p></blockquote>
<p>点击选择需要的版本 → client-tools → 点击<strong>pdi-ce-xxxxxx.zip</strong>文件下载解压即可</p>
</li>
<li>
<h3 id="启动kettle">启动Kettle<a href="#%e5%90%af%e5%8a%a8kettle" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h3>
<p>通过终端进入解压后得到的**/data-integration**目录，</p>
<p>输入命令<code>sh spoon.sh</code> 等待自动启动即可（时间可能较长）</p>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/03.png" alt="启动Kettle"></p>
<p>看到 <strong>Spoon -欢迎!</strong> 字样 大功告成～ 🎉</p>
</li>
</ol>
</li>
</ul>
<p>​</p>
<ul>
<li>
<h2 id="可能出现的问题">可能出现的问题<a href="#%e5%8f%af%e8%83%bd%e5%87%ba%e7%8e%b0%e7%9a%84%e9%97%ae%e9%a2%98" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<ol>
<li>
<p>I&rsquo;m sorry, this Mac platform [arm64] is not yet supported! Please try starting using &lsquo;Data Integration 32-bit&rsquo; or &lsquo;Data Integration 64-bit&rsquo; as appropriate.</p>
<p><strong>报错如下</strong>：</p>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/04.png" alt="问题1-1"></p>
<p><strong>分析：</strong></p>
<p>Rosetta Termina并没有配置好 并没有用成功Rosetta转译运行 请重回 <strong>步骤1</strong> 仔细参考 <a href="https://cutecoder.org/software/run-command-line-apple-silicon/">https://cutecoder.org/software/run-command-line-apple-silicon/</a></p>
<p><strong>另外我这篇笔记默认您安装了Rosetta 如没有安装 请您先自行安装 网上很多教程</strong></p>
</li>
<li>
<p><strong>java相关问题</strong></p>
<p><strong>报错1:</strong></p>
<p>endorsed is not supported. Endorsed standards and standalone APIs</p>
<p>in modular form will be supported via the concept of upgradeable modules.</p>
<p>Error: Could not create the Java Virtual Machine.</p>
<p>Error: A fatal exception has occurred. Program will exit.</p>
<p><strong>分析：</strong></p>
<p>Java JDK 版本不匹配 请下载正确对应版本 请重回 <strong>步骤3</strong></p>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/05.png" alt="问题2-1"></p>
<p><strong>报错2:</strong></p>
<p>java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:</p>
<p>​	no swt-cocoa-4940r23 in java.library.path</p>
<p>​	no swt-cocoa in java.library.path</p>
<p><strong>分析：</strong></p>
<p>Java JDK是arm64版本的 请下载x86版本 因为很多朋友可能在了解kettle之前就在自己心爱的m1上配置了Java环境 但是oracle并没有原生适配M1 所以一般我们下载的都是arm架构的 Zulu JDK 但是由于我们的Kettle是x86</p>
<p><strong>所以架构体系一定要对应！！！请重回步骤3</strong></p>
<p>可以看到 下图 <code>java -version</code> 显示的虽然是jdk版本没问题 但是版本架构不对</p>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/06.png" alt="问题2-2"></p>
</li>
<li>
<p><strong>Kettle mac 启动失败（闪退）报错 Unknown Source</strong></p>
<blockquote>
<p>参考 <a href="https://blog.csdn.net/qq_41066235/article/details/108668423">https://blog.csdn.net/qq_41066235/article/details/108668423</a></p></blockquote>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/07.png" alt="问题3-1"></p>
<p><strong>分析：</strong></p>
<p>下载最新的eclipse.swt包，替换kettle中的原文件即可  <a href="https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.swt.cocoa.macosx.x86_64">下载地址</a></p>
<p>替换路径：data-integration → libswt → osx64</p>
<p><img src="https://raw.githubusercontent.com/ColeMei/Picgo/master/running-pentaho-data-integration-on-mac-bigsur-m1/08.png" alt="问题3-2"></p>
</li>
</ol>
</li>
</ul>
<p>​</p>
<ul>
<li>
<h2 id="结语">结语<a href="#%e7%bb%93%e8%af%ad" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<p>M1可真是个磨人的小妖精～ Rosetta的转译不知道后续还会遇到什么bug</p>
<p>期待后续的Kettle学习之路～ 💪</p>
</li>
</ul>
]]></content></item></channel></rss>