[SOLVED] cannot stat 'test.h': No such file or directory why?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just before we go anyfurther, want to confirm that you know that RPM packages are generally meant for Red Hat or SUSE variants of Linux? whereas ubuntu is branched off from the Debian side. deb or dpkg would be the alternatives for ubuntu I believe.
Just before we go anyfurther, want to confirm that you know that RPM packages are generally meant for Red Hat or SUSE variants of Linux? whereas ubuntu is branched off from the Debian side. deb or dpkg would be the alternatives for ubuntu I believe.
Hi
I correct the type to .sh. but the same problem. I test in both Redhat and ubuntu. In Redhat I'm not root user.
Ok, so is this the redhat box or the ubuntu box you are testing this on? also can you supply the command you are running for when you see the issues? With output.
Primary reason for the issue is that the article is crap. Its wrong. The spec file he uses is wrong.
So here. Here is my re-interpretation.
Code:
(Log in as a non-root user)
mkdir ~/test-1.0
cd ~/test-1.0
echo echo this is a test > test.sh
chmod +x test.sh
echo just launch the script > README
cd
mkdir -p ~/rpmbuild/SOURCES
mkdir -p ~/rpmbuild/SPECS
tar -cvzf ~/rpmbuild/SOURCES/test-1.0.tar.gz test-1.0
cp test-1.0/* ~/rpmbuild/BUILD
vim ~/rpmbuild/SPECS/demo.spec
The demo.spec file contents:
Code:
Name: test
Version: 1.0
Release: 1%{?dist}
Summary: A test package
Group: Test Packages
License: GPL
URL: http://test.example.com
Source0: %{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: /bin/rm, /bin/mkdir, /bin/cp
Requires: /bin/bash, /bin/date
%description
Demo package for deployment of one single file
%prerp
%setup -q
%build
#configure
#make %{? _smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/bin
cp test.sh $RPM_BUILD_ROOT/usr/local/bin
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(755,root,root,755)
#%doc
%attr(0755,root,root)/usr/local/bin/test.sh
%changelog
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.