<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 17:12:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>Linux &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>RPM: Performing Offline Installation</title>
		<link>https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/</link>
					<comments>https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Sun, 05 Jul 2020 00:34:40 +0000</pubDate>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=1177</guid>

					<description><![CDATA[<p>PROBLEM To perform an offline (or airgapped) installation, sometimes it&#8217;s not sufficient to download just the needed RPM package. In most cases, this package requires a list of dependencies to be installed too. For example, Nginx requires at least 20 different packages in order for its installation to be successful:- SOLUTION The first step to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/">RPM: Performing Offline Installation</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p class="wp-block-paragraph">To perform an offline (or airgapped) installation, sometimes it&#8217;s not sufficient to download just the needed RPM package. In most cases, this package requires a list of dependencies to be installed too.</p>



<p class="wp-block-paragraph">For example, <b>Nginx</b> requires at least 20 different packages in order for its installation to be successful:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ sudo yum deplist nginx
package: nginx.x86_64 1:1.16.1-1.el7
  dependency: /bin/sh
   provider: bash.x86_64 4.2.46-34.el7
  dependency: libc.so.6(GLIBC_2.17)(64bit)
   provider: glibc.x86_64 2.17-307.el7.1
  dependency: libcrypt.so.1()(64bit)
   provider: glibc.x86_64 2.17-307.el7.1
  ...
  ...
  ...
  dependency: system-logos
   provider: redhat-logos.noarch 70.7.0-1.el7
  dependency: systemd
   provider: systemd.x86_64 219-73.el7_8.8
</pre></div>


<h2 class="wp-block-heading">SOLUTION</h2>



<p class="wp-block-paragraph">The first step to spin up an instance using the same Linux distro/version and this instance must have internet access.</p>



<p class="wp-block-paragraph">Download the following yum plugin that allows the package(s) to be downloaded without installing them:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo yum install yum-plugin-downloadonly
</pre></div>


<p class="wp-block-paragraph">Download the needed package (in this case, <b>Nginx</b>) and its dependencies into a directory:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo yum install --downloadonly --downloaddir=/tmp/nginx nginx
</pre></div>


<p class="wp-block-paragraph">To inspect what&#8217;s being downloaded:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ ls -a /tmp/nginx | sort
.
..
dejavu-fonts-common-2.33-6.el7.noarch.rpm
dejavu-sans-fonts-2.33-6.el7.noarch.rpm
fontconfig-2.13.0-4.3.el7.x86_64.rpm
fontpackages-filesystem-1.44-8.el7.noarch.rpm
gd-2.0.35-26.el7.x86_64.rpm
gperftools-libs-2.6.1-1.el7.x86_64.rpm
libjpeg-turbo-1.2.90-8.el7.x86_64.rpm
libX11-1.6.7-2.el7.x86_64.rpm
libX11-common-1.6.7-2.el7.noarch.rpm
libXau-1.0.8-2.1.el7.x86_64.rpm
libxcb-1.13-1.el7.x86_64.rpm
libXpm-3.5.12-1.el7.x86_64.rpm
nginx-1.16.1-1.el7.x86_64.rpm
nginx-all-modules-1.16.1-1.el7.noarch.rpm
nginx-filesystem-1.16.1-1.el7.noarch.rpm
nginx-mod-http-image-filter-1.16.1-1.el7.x86_64.rpm
nginx-mod-http-perl-1.16.1-1.el7.x86_64.rpm
nginx-mod-http-xslt-filter-1.16.1-1.el7.x86_64.rpm
nginx-mod-mail-1.16.1-1.el7.x86_64.rpm
nginx-mod-stream-1.16.1-1.el7.x86_64.rpm
redhat-indexhtml-7-13.el7.noarch.rpm
</pre></div>


<p class="wp-block-paragraph">Now, this directory can be safely compressed into a tarball to be copied to the target instance without internet access.</p>



<p class="wp-block-paragraph">After extracting the tarball in the target instance, it&#8217;s time to install the package:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo yum -y --disablerepo=* localinstall /tmp/nginx/*.rpm
</pre></div>


<p class="wp-block-paragraph">This command is smart enough to figure out all the dependencies within the directory and install them in the proper order.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/">RPM: Performing Offline Installation</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1177</post-id>	</item>
		<item>
		<title>tar: Exiting with failure status due to previous errors</title>
		<link>https://myshittycode.com/2017/06/12/tar-exiting-with-failure-status-due-to-previous-errors/</link>
					<comments>https://myshittycode.com/2017/06/12/tar-exiting-with-failure-status-due-to-previous-errors/#comments</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Mon, 12 Jun 2017 14:57:21 +0000</pubDate>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=1043</guid>

					<description><![CDATA[<p>PROBLEM When creating a compressed archive file:- &#8230; the following error is thrown:- SOLUTION This error usually occurs due to permission issues. However, the error messages are hidden beneath gobs of output activated by the verbose flag. To fix this, reduce the output by removing the -v flag:- &#8230; and now, the error message appears:- [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2017/06/12/tar-exiting-with-failure-status-due-to-previous-errors/">tar: Exiting with failure status due to previous errors</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p class="wp-block-paragraph">When creating a compressed archive file:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
tar -zcvf apps.tar.gz apps
</pre></div>


<p class="wp-block-paragraph">&#8230; the following error is thrown:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
tar: Exiting with failure status due to previous errors
</pre></div>


<h2 class="wp-block-heading">SOLUTION</h2>



<p class="wp-block-paragraph">This error usually occurs due to permission issues.</p>



<p class="wp-block-paragraph">However, the error messages are hidden beneath gobs of output activated by the verbose flag.</p>



<p class="wp-block-paragraph">To fix this, reduce the output by removing the <b>-v</b> flag:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
tar -zcf apps.tar.gz apps
</pre></div>


<p class="wp-block-paragraph">&#8230; and now, the error message appears:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
tar: apps/apps.key.enc: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors
</pre></div>


<p class="wp-block-paragraph">Once the problem is fixed, the command will run successfully.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2017/06/12/tar-exiting-with-failure-status-due-to-previous-errors/">tar: Exiting with failure status due to previous errors</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2017/06/12/tar-exiting-with-failure-status-due-to-previous-errors/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1043</post-id>	</item>
		<item>
		<title>Git + Linux: (gnome-ssh-askpass:24871): Gtk-WARNING **: cannot open display:</title>
		<link>https://myshittycode.com/2016/09/12/git-linux-gnome-ssh-askpass24871-gtk-warning-cannot-open-display/</link>
					<comments>https://myshittycode.com/2016/09/12/git-linux-gnome-ssh-askpass24871-gtk-warning-cannot-open-display/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Mon, 12 Sep 2016 16:11:10 +0000</pubDate>
				<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=913</guid>

					<description><![CDATA[<p>PROBLEM When running git clone on Linux, the following error appears:- SOLUTION To fix this, run the following command to disable gnome-ssh-askpass:- Now, git clone will work just fine:- To prevent this from happening again, add unset SSH_ASKPASS command to .bashrc file.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2016/09/12/git-linux-gnome-ssh-askpass24871-gtk-warning-cannot-open-display/">Git + Linux: (gnome-ssh-askpass:24871): Gtk-WARNING **: cannot open display:</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p class="wp-block-paragraph">When running <b>git clone</b> on Linux, the following error appears:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
-bash-4.1$ git clone http://user@tfs:8080/tfs/my-institution/my-domain/_git/my-project
Initialized empty Git repository in /people/my-group/user/my-project/.git/

(gnome-ssh-askpass:24871): Gtk-WARNING **: cannot open display:
</pre></div>


<h2 class="wp-block-heading">SOLUTION</h2>



<p class="wp-block-paragraph">To fix this, run the following command to disable gnome-ssh-askpass:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
-bash-4.1$ unset SSH_ASKPASS
</pre></div>


<p class="wp-block-paragraph">Now, <b>git clone</b> will work just fine:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
-bash-4.1$ git clone http://user@tfs:8080/tfs/my-institution/my-domain/_git/my-project
Initialized empty Git repository in /people/my-group/user/my-project/.git/
Password:
remote:
remote:                    fTfs
remote:                  fSSSSSSSs
remote:                fSSSSSSSSSS
remote: TSSf         fSSSSSSSSSSSS
remote: SSSSSF     fSSSSSSST SSSSS
remote: SSfSSSSSsfSSSSSSSt   SSSSS
remote: SS  tSSSSSSSSSs      SSSSS
remote: SS   fSSSSSSST       SSSSS
remote: SS fSSSSSFSSSSSSf    SSSSS
remote: SSSSSST    FSSSSSSFt SSSSS
remote: SSSSt        FSSSSSSSSSSSS
remote:                FSSSSSSSSSS
remote:                  FSSSSSSs
remote:                    FSFs    (TM)
remote:
remote:  Microsoft (R) Visual Studio (R) Team Foundation Server
remote:
Receiving objects: 100% (504/504), 1.05 MiB, done.
Resolving deltas: 100% (138/138), done.
</pre></div>


<p class="wp-block-paragraph">To prevent this from happening again, add <b>unset SSH_ASKPASS</b> command to <b>.bashrc</b> file.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2016/09/12/git-linux-gnome-ssh-askpass24871-gtk-warning-cannot-open-display/">Git + Linux: (gnome-ssh-askpass:24871): Gtk-WARNING **: cannot open display:</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2016/09/12/git-linux-gnome-ssh-askpass24871-gtk-warning-cannot-open-display/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">913</post-id>	</item>
		<item>
		<title>Linux: Locating Java Home Directory</title>
		<link>https://myshittycode.com/2014/03/12/linux-locating-java-home-directory/</link>
					<comments>https://myshittycode.com/2014/03/12/linux-locating-java-home-directory/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Wed, 12 Mar 2014 14:48:05 +0000</pubDate>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=379</guid>

					<description><![CDATA[<p>If you have multiple versions of Java installed, you can run which command to determine the full path of the command. To quickly navigate to Java&#8217;s home directory, you can do something like this:-</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2014/03/12/linux-locating-java-home-directory/">Linux: Locating Java Home Directory</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you have multiple versions of Java installed, you can run <b>which</b> command to determine the full path of the command.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
which java
</pre></div>


<p class="wp-block-paragraph">To quickly navigate to Java&#8217;s home directory, you can do something like this:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
cd `which java`/..
</pre></div><p>The post <a rel="nofollow" href="https://myshittycode.com/2014/03/12/linux-locating-java-home-directory/">Linux: Locating Java Home Directory</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2014/03/12/linux-locating-java-home-directory/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">379</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Disk

Served from: myshittycode.com @ 2026-07-08 22:59:12 by W3 Total Cache
-->