I have this issue with some Perl modules on Fedora Linux. They are installed correctly and not show up in the list after.
For example I run:
cpan XML::SAX::Base
it produced lengthy output like:
-------------------------------------------------
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 12 Aug 2014 23:41:02 GMT
Running install for module 'XML::SAX::Base'
Running make for G/GR/GRANTM/XML-SAX-Base-1.08.tar.gz
Checksum for /root/.cpan/sources/authors/id/G/GR/GRANTM/XML-SAX-Base-1.08.tar.gz ok
CPAN.pm: Building G/GR/GRANTM/XML-SAX-Base-1.08.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for XML::SAX::Base
Writing MYMETA.yml and MYMETA.json
cp lib/XML/SAX/Base.pm blib/lib/XML/SAX/Base.pm
cp lib/XML/SAX/Exception.pm blib/lib/XML/SAX/Exception.pm
cp BuildSAXBase.pl blib/lib/XML/SAX/BuildSAXBase.pl
Manifying blib/man3/XML::SAX::Exception.3pm
Manifying blib/man3/XML::SAX::BuildSAXBase.3pm
Manifying blib/man3/XML::SAX::Base.3pm
GRANTM/XML-SAX-Base-1.08.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic.t ............. ok
t/01exception.t ......... ok
t/01simpledriver.t ...... ok
t/02simplefilter.t ...... ok
t/03chdriver.t .......... ok
t/04chfilter.t .......... ok
t/05dtdhdriver.t ........ ok
t/06lexhdriver.t ........ ok
t/07declhdriver.t ....... ok
t/08errorhdriver.t ...... ok
t/09resoldriver.t ....... ok
t/10dochdriver.t ........ ok
t/11sax1multiclass.t .... ok
t/12sax2multiclass.t .... ok
t/13handlerswitch.t ..... ok
t/14downstreamswitch.t .. ok
t/15parentswitch.t ...... ok
t/16gethandlers.t ....... ok
t/release-pod-syntax.t .. skipped: these tests are for release candidate testing
All tests successful.
Files=19, Tests=137, 1 wallclock secs ( 0.09 usr 0.03 sys + 0.61 cusr 0.11 csys = 0.84 CPU)
Result: PASS
GRANTM/XML-SAX-Base-1.08.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying blib/man3/XML::SAX::Exception.3pm
Manifying blib/man3/XML::SAX::BuildSAXBase.3pm
Manifying blib/man3/XML::SAX::Base.3pm
Appending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
GRANTM/XML-SAX-Base-1.08.tar.gz
/usr/bin/make install -- OK
--------------------------------------------
Looks like the module installed. When I run:
cpan -l | grep SAX
it gives nothing.
If I run installation again:
cpan XML::SAX::Base
it will install it again.
I guess something wrong with the database, is there any way to fix it?
Finally, I was able to fix this problem. As I understand, the whole problem was in installation of different parts of Perl in different folders. For example, I had /root/perl5 folder and /home/user1/perl5 folder.I was not able to install modules as a non-root user. I had to switch to root any time, I was installing any module. Then I had to switch back to user when I was creating perl script. Now I moved everything to normal user and it's finally working.
That is how I did it:
First under root:
su - ;
rm -fr /home/user/perl5/ ;
mv -f perl5 /home/user/ ;
chown -fR user /home/user/perl5 ;
chgrp -fR user /home/user/perl5 ;
exit `
Second under user:
PATH=$PATH:/home/user/perl5/bin;
export PERL5LIB=/home/user/perl5/lib/perl5/;
Those two commands you need to enter every time after reboot or use ~/.bashrc
Now I can do either cpan XML::SAX::Base or cpanm XML::SAX::Base and it is all good and I don't need to switch to root any more every time I install modules!!!
Related
I'm trying to build an external tool with AOSP. My OS is Linux, Distribution ArchLinux (i3wm), but to compile AOSP I use Ubuntu in Docker (https://android.googlesource.com/platform/build/+/master/tools/docker)
First step:
# init repo
repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r36 --depth=1
repo sync
. build/envsetup.sh # set up environment
lunch aosp_arm-eng # select target to build
Second step: select tool and build
cd external/selinux
mma -j48
Output:
ninja: error: unknown target 'MODULES-IN-'
15:41:55 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/user/aosp'
#### make failed to build some targets (6 seconds) ###
Another tool
cd external/wpa_supplicant_8
mma -j48
Output:
ninja: error: unknown target 'MODULES-IN-external-wpa_supplicant_8'
15:41:55 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/user/aosp'
#### make failed to build some targets (2 seconds) ###
This happens with any aosp generic target:
Lunch menu... pick a combo:
1. aosp_arm-eng # fails
2. aosp_arm64-eng # fails
3. aosp_mips-eng # fails
4. aosp_mips64-eng # fails
5. aosp_x86-eng # fails
6. aosp_x86_64-eng # fails
7. full_fugu-userdebug # works
8. aosp_fugu-userdebug # works
9. car_emu_arm64-userdebug # fails
10. car_emu_arm-userdebug # fails
11. car_emu_x86_64-userdebug # fails
12. car_emu_x86-userdebug # fails
13. mini_emulator_arm64-userdebug # fails
14. m_e_arm-userdebug # fails
15. m_e_mips64-eng # fails
16. m_e_mips-userdebug # fails
17. mini_emulator_x86_64-userdebug # fails
18. mini_emulator_x86-userdebug # fails
19. aosp_dragon-userdebug # works
20. aosp_dragon-eng # works
21. aosp_marlin-userdebug # works
22. aosp_marlin_svelte-userdebug # works
23. aosp_sailfish-userdebug # works
24. aosp_angler-userdebug # works
25. aosp_bullhead-userdebug # works
26. aosp_bullhead_svelte-userdebug # works
27. hikey-userdebug # works
I want to compile some binary tools in all arch: arm, arm64, x86 and x86_64.
Why aosp_arm-eng does not work? Or how can I change the CPU architecture from non generic aosp target?
Using tapas does not work.
You probably need to make a full AOSP build before trying to use mm... shortcuts - looks like some build script files were not generated yet.
clear all the binaries from /out dir with make clean command & then try to make a full build
Actually there is no need to do a full build. Just open your Android.mk or Android.bp of the module you want to build, and look for variable MODULE_NAME.
Then from the root of the project make
mm $MODULE_NAME
It should build all the dependencies you need first.
I suggest that use the mmm command for building. Also make sure that the directory you are pointing to contains a Android.bp or Android.mk
mmm /external/selinux
Also I suggest to clean the outputs by remove the out directory or simply run:
make clean
If still you have that problem, remove the --depth=1 argument on repo init and sync it again. that argument limits the commit fetching from remote branch.
Use below commands to compile module from root dir
Goto root dir
make clean
source build/envsetup.sh
lunch "select option"
make "module name" -j8
Running chef-solo (Installing Chef Omnibus (12.3)) on centos6.6
My recipe has the following simple code:
package 'cloud-init' do
action :install
end
log 'rpm-qi' do
message `rpm -qi cloud-init`
level :warn
end
log 'yum list' do
message `yum list cloud-init`
level :warn
end
But it outputs the following:
- install version 0.7.5-10.el6.centos.2 of package cloud-init
* log[rpm-qi] action write[2015-07-16T16:46:35+00:00] WARN: package cloud-init is not installed
[2015-07-16T16:46:35+00:00] WARN: Loaded plugins: fastestmirror, presto
Available Packages
cloud-init.x86_64 0.7.5-10.el6.centos.2 extras
I am at a loss as to why rpm/yum and actually rpmquery don't see the package as installed.
EDIT: To clarify I am specifically looking for the following string post package install to then apply a change to the file (I understand this is not a very chef way to do something I am happy to accept suggestions):
rpmquery -l cloud-init | grep 'distros/__init__.py$'
I have found that by using the following:
install_report = shell_out('yum install -y cloud-init').stdout
cloudinit_source = shell_out("rpmquery -l cloud-init | grep 'distros/__init__.py$'").stdout
I can then get the file I am looking for and perform
Chef::Util::FileEdit.new(cloudinit_source.chomp(''))
The file moves based on the distribution but I need to edit that file specifically with in place changes.
Untested code, just to give the idea:
package 'cloud-init' do
action :install
notifies :run,"ruby_block[update_cloud_init]"
end
ruby_block 'update_cloud_init' do
block do
cloudinit_source = shell_out("rpmquery -l cloud-init | grep 'distros/__init__.py$'").stdout
rc = Chef::Util::FileEdit.new(cloudinit_source.chomp(''))
rc.search_file_replace_line(/^what to find$/,
"replacement datas for the line")
rc.write_file
end
end
ruby_block example taken and adapted from here
I would better go using a template to manage the whole file, what I don't understand is why you don't know where it will be at first...
Previous answer
I assume it's a compile vs converge problem. at the time the message is stored (and so your command is executed) the package is not already installed.
Chef run in two phase, compile then converge.
At compile time it build a collection of resources and at converge time it execute code for the resource to get them in the described state.
When your log resource is compiled, the ugly back-ticks are evaluated, at this time there's a package resource in the collection but the resource has not been executed, so the output is correct.
I don't understand what you want to achieve with those log resources at all.
If you want to test your node state after chef-run use a handler maybe calling ServerSpec as in Test-Kitchen.
Hi i want to install MinorFS 0.3.5 to my computer. My Ubuntu version is 14.04 LTS. But i had some problems while installing the program.
Firstly i installed all fuse modules and gcc and run the script install.pl.
The program is designed for Ubuntu 8. As a result it wants to install fuse module to start the script install.pl.
But there is not a loadable fuse module for Ubuntu 14.04 LTS. I research about it and i see that, for the latest version of Ubuntu, the kernel is configured to include FUSE instead of compiling it as a module. So, i modified the perl code in install.pl and
install the script.(I install fuseiso with command apt-get install fuseiso just in case.)
Everyting is great for the moment. But for the next step, i run the command on terminal "/etc/init.d/minorfs start ".
And i get this error : " The path specified in /var/minorfs/viewfs.startcap is not a valid base dir for minorviewfs
"
This command runs the minorcapfs and minorviewfs i guess.Minorcapfs run succesfully but for minorviewfs i got this error.
The code which gives the Error writen below:(in minorviewfs file)
unless (-d $basepath) {
print STDERR "The path specified in $VARDIR/viewfs.startcap is not a valid base dir for minorviewfs\n";
exit 1;
}
Then for test, i print my " $basepath " and it's : /mnt/minorfs/cap/61ce0488ac06eba530e178a0d1716ec576b47f71
I couldn't solve this error.
Please help me to get rid of this problem.
Thank you!
I solved the problem with manually making a directory with the mkdir command. Now the script work. But now I have a different problem. The output is ;
Starting MinorFs filesystems minorcapfs going into background, consult syslog for information minorviewfs going into background, consult syslog for information.
Then when i run the command ls -la /mnt/minorfs/priv
i should get a links to the folders. But I have nothing.
dr-xr-xr-x 1 root root 0 Jan 1 1970 .
lrwxrwxrwx 1 root root 0 Jan 1 1970 home ->
lrwxrwxrwx 1 root root 0 Jan 1 1970 tmp ->
So i looked the system log file with gedit /var/log/syslog and i see that Error;
Sep 1 13:51:37 burak-UX31A minorcapfs[3581]: Problem in Fuse::main at /usr/local/bin/minorcapfs line 340
Sep 1 13:51:37 burak-UX31A minorcapfs[3581]: user: 0 1001 ; group 104 104 104 104 at /usr/local/bin/minorcapfs line 341
Sep 1 13:51:37 burak-UX31A minorcapfs[3581]: Probably a problem accesing /dev/fuse at /usr/local/bin/minorcapfs line 342
Sep 1 13:52:01 burak-UX31A minorviewfs[3584]: Use of uninitialized value in subroutine entry at /usr/lib/perl5/Fuse.pm line 147, line 26.
And this the MinorCapfs code ; http://codepad.org/nUUJ3b5m
How to get rid of this problems? Thank you.
I'm trying to run GAE tests on multiple packages. My app (testapp ) looks as below:
testapp>
README.md package1 package2
each package has two go files. One is the package itself the other is the 'test' package.
package1
$ls package1
package1.go package1_test.go
package2
$ls package2
package2.go package2_test.go
To run the tests I use
goapp test -v ./...
Output:
warning: building out-of-date packages:
github.com/mihai/API
installing these packages with 'go test -i ./...' will speed future tests.
=== RUN TestGetDiskFile
codelistgobfile.gob
codelist.gob written successfully
--- PASS: TestGetDiskFile (0.00 seconds)
PASS
ok testapp/package1 0.010s
However as you can see above it seems to run only the first test ( TestGetDiskFile ) from package1. After that it gets stuck. I get no kind of output. If I go in each package ( cd package 1 ) and run goapp test all the tests (about 20 tests) run successfully
Any idea how I can fix / run all the tests without getting stuck or at least how I can debug it further? is this a goapp bug?
I've tried on two different machines ( Mac osx , and ubuntu ), the result is same.
To debug, strip things down to a minimal test case. For example, the following is a minimal test case for go test -v ./.... Try something similar for goapp test -v ./....
$ dir
package1 package2
$ tree ../packages
../packages
├── package1
│ └── package1_test.go
└── package2
└── package2_test.go
2 directories, 2 files
$ go test -v ./...
=== RUN TestPackage1
--- PASS: TestPackage1 (0.00 seconds)
PASS
ok packages/package1 0.004s
=== RUN TestPackage2
--- PASS: TestPackage2 (0.00 seconds)
PASS
ok packages/package2 0.004s
$
File: package1_test.go:
package package1
import "testing"
func TestPackage1(t *testing.T) {}
File: package2_test.go:
package package2
import "testing"
func TestPackage2(t *testing.T) {}
I have configured a private APT repository (using resources on internet like http://inodes.org/2009/09/14/building-a-private-ppa-on-ubuntu/) and I'm uploading for the first time my package containing the sources of my C++ application.
So reprepro repository is empty.
I use the following command in order to start the build:
sudo reprepro -V -b /srv/reprepro processincoming incoming
Then the build start, a lot of output is genearated and I can see that pbuilder is compiling the project source code and everything is fine. I can even find in the result/ folder debian packages etc...
But the build failed with a POST_BUILD_FAILED because it seems that pbuilder has changed the douane-testing_0.8.1-apt1.debian.tar.gz file and the md5 sum is now different as shown here:
File "pool/main/d/douane-testing/douane-testing_0.8.1-apt1.debian.tar.gz" is already registered with different checksums!
md5 expected: 97257ae2c5790b84ed7bb1b412f1d518, got: df78f88b97cadc10bc0a73bf86442838
sha1 expected: ae93c44593e821696f72bee4d91ce4b6f261e529, got: d6f910ca5707ec92cb71601a4f4c72db0e5f18d9
sha256 expected: c3fac5ed112f89a8ed8d4137b34f173990d8a4b82b6212d1e0ada1cddc869b0e, got: ebdcc9ead44ea0dd99f2dc87decffcc5e3efaee64a8f62f54aec556ac19d579c
size expected: 2334, got: 2344
There have been errors!
I don't understand why it is failing as when I compare the 2 packages (having those md5 sums) the content is strictly the same (I used a diff tool but no differences and no new or removed files).
The only thing I can see is that the archive from pbuild is bigger of 10 Bytes than the orginal one I have uploaded:
On my development machine, the file with the md5 97257ae2c5790b84ed7bb1b412f1d518 :
-rw-r--r-- 1 zedtux zedtux 2334 Feb 3 23:38 douane-testing_0.8.1-apt1.debian.tar.gz
On my server, the file with the md5 df78f88b97cadc10bc0a73bf86442838 :
-rw-r--r-- 1 root root 2344 Feb 5 00:58 douane-testing_0.8.1-apt1.debian.tar.gz
I have pbuild version 0.213 on my server.
What could be the reason of this behavior and how can I fix it ?
Edit
I'm suspecting an issue with the GPG key which looks missing and then files aren't signed so md5sum is different.
During the build process I have the following lines:
I: Extracting source
gpgv: Signature made Wed Feb 5 22:04:37 2014 UTC using RSA key ID 9474CF36
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./douane-testing_0.8.1-apt1.dsc
Edit 2
I have tried to find the command to create manually the .debian.tar.gz file.
The best I've found is the following:
tar cv debian | gzip --no-name --rsyncable -9 > douane-testing_0.8.1-apt1.debian.tar.gz
I don't get the same result than dpkg-source but I tried the same command on my server (I should at least have the same size) but it's not matching...
Could it be that Debian and Ubuntu aren't compressing the same way ?
Finally after some evenings of research I found the solution on launchpad.net !
Found the solution. By default pbuilder calls dpkg-buildpackage like so:
DEBBUILDOPTS="$DEBBUILDOPTS -rfakeroot"
dpkg-buildpackage -us -uc $DEBBUILDOPTS
That causes dpkg-buildpackage to rebuild the diff.gz and .dsc files. Add a -b in there, and it won't. It also means the resulting .changes file will only reference the .deb file. Which is what you want, I think.
The easy solution is to add a line to your .pbuilderrc:
DEBBUILDOPTS="-b"
My previous answer is alright but is not complete.
Then I had the issue that reprepro complains about the source tarball (.orig.tar.xz).
But it was normal as I wasn't doing the packages correctly.
I have written a bash script which I'm executing in VM for each Ubuntu series.
This script was always doing everything from scratch, and was using dh_make --createorig argument and here is the issue.
The correct way is to generate once (for example on Ubuntu precise) and then re-use the .orig.tar.xz file and no more use the --createorig argument of dh_make.
I hope this could help someone :-)