I'm trying to install Raku on a Debian 11 x64. I never installed it before (perl5 too)
It's a server with some Perl5 scripts, and I want to "use" it in Raku with the Inline::Perl5 (also I want to use Perl5 Module if I don't find what I want in Raku Module) but I can't.
The perl5 is installed by APT, rakudo too.
When running zef install Inline::Perl5, I get the following:
===> Searching for: Inline::Perl5
===> Searching for missing dependencies: Distribution::Builder::MakeFromJSON:ver<0.6+>
===> Searching for missing dependencies: System::Query
===> Failed to find dependencies: System::Query Failed to resolve some missing dependencies
If I try to install System::Query with zef, I obtain :
===> Searching for: System::Query
No candidates found matching identity: System::Query
Do you have some idea to help me ?
Thank's a lot
The rakudo version you've installed probably does not have that one baked in. You can upgrade zef via zef upgrade zef. My version of zef, 0.14.5, is able to find System::Query without a glitch.
> zef search System::Query
===> Updating fez mirror: https://360.zef.pm/
===> Updated fez mirror: https://360.zef.pm/
===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Found 8 results
---------------------------------------------------------------------------------------------------------------------------------------------------------------
ID|From |Package |Description
---------------------------------------------------------------------------------------------------------------------------------------------------------------
0 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.6>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
1 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.5>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
2 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.4>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
3 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.6>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
4 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.5>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
5 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.4>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
6 |Zef::Repository::LocalCache |System::Query:ver<0.1.6>:auth<zef:tony-o> |A utility for collapsing JSON dependent upon certain environmental information
7 |Zef::Repository::LocalCache |System::Query:ver<0.1.4>:auth<github:tony-o>|A utility for collapsing JSON dependent upon certain environmental information
---------------------------------------------------------------------------------------------------------------------------------------------------------------
I occasionally reach for apt-get like this:
`sudo apt-get install rakudo -y`;
`sudo git clone https://github.com/ugexe/zef.git`;
`sudo raku -I./zef zef/bin/zef install ./zef --/test`;
It is handy and works up to a point - but (as just checked) it does not do the job for Inline::Perl5. Notoriously within the raku community, the last pickup for the apt-get build pipeline coincided with a half completed move of zef into core - so, as you can see you need to install zef by hand for now (only if you go the apt-get route).
The reason for Inline::Perl5 to fail is set out in the Inline::Perl5 README.md documents is:
If you use the perl that comes with a Linux distribution, you may need
to install a separate package containing the perl library.
This section of the documents gives instructions of how to do this build.
Having been here before, I put this all into a Dockerfile that you are welcome to scavenge / use directly.
I have also just pushed an amd64 image p6steve/raku-dan:paddle to docker hub, so you can just go:
docker run -it p6steve/raku-dan:paddle
zef install Inline::Perl5
This has cpanm too so you can grab any cpan modules you want.
Related
Requires: in the spec files sets the package dependencies, but what will happen if the repo of the requirements is not in the repolist?
Is there a way to use pre downloaded rpm files and tell the rpmbuild that the dependencies should be installed from the local file like yum localinstall.
You're conflating rpm and yum when you mention repolist.
rpm is a lower level and only knows about RPM files
yum collects sets of RPMs into repositories and sits on top of RPM to handle dependencies
Now, to answer the question - rpmbuild does not need anything from the Requires field to build the RPM. If it does, then the RPMs should be listed as BuildRequires in the specfile and only be in Requires if the end user needs it to be installed to run the final product. For example, to build you might need foo-devel but at runtime you only need libfoo. Those should be declared appropriately.
Even if you fix the Requires vs. BuildRequires fields, it still won't help you - rpmbuild cannot install RPMs itself because you should never run rpmbuild as root. An error in a specfile can very easily nuke an entire machine if it's run as root.
When upgrading rakudo version using rakubrew, is pretty easy to change versions, but I wnat to know if it is posible to import raku modules from the older version to the new version. doign zef install automatically:
to update:
rakubrew build 2020.10
but then:
❯ raku
Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v2020.10.
Implementing the 𝐑𝐚𝐤𝐮™ programming language v6.d.
Built on MoarVM version 2020.10.
You may want to `zef install Readline` or `zef install Linenoise` or use rlwrap for a line editor
To exit type 'exit' or '^D'
so I need to install all modules that I currently use:
rakubrew build-zef
zef install Sparrow6
zef install Linenoise
so exists any file .zef or .rakubrew or something that checks to maintain this modules automatically
You can get the list of installed modules using zef list --installed. Note you probably want to ignore the share/perl6 repo, as the CORE module included in it is specific to each version of rakudo.
see: https://github.com/ugexe/zef#list-from
list [*#from]
List known available distributions
$ zef --installed list
===> Found via /home/nickl/.rakubrew/moar-master/install/share/perl6/site
CSV::Parser:ver<0.1.2>:auth<github:tony-o>
Zef:auth<github:ugexe>
===> Found via /home/nickl/.rakubrew/moar-master/install/share/perl6
CORE:ver<6.c>:auth<perl>
Alternatively you can use the following one-liner to get a list:
$ raku -e 'say $*REPO.repo-chain.grep(CompUnit::Repository::Installation).map(*.installed.Slip).grep(*.defined).map({ CompUnit::Repository::Distribution.new($_).Str }).join(" ")'
Text::Table::Simple:ver<0.0.7>:auth<github:ugexe>:api<> CSV::Parser:ver<0.1.2>:auth<github:tony-o>:api<> CORE:ver<6.d>:auth<perl>:api<>
# $*REPO.repo-chain.grep(CompUnit::Repository::Installation) # Get only repos for installed raku modules
# .map(*.installed.Slip) # Get a list of installed modules for this repo, and Slip it into the outer singular results list
# .grep(*.defined) # Some repos will have had no modules, so remove these undefined entries
# .map({ CompUnit::Repository::Distribution.new($_).Str }) # Use CompUnit::Repository::Distribution to get at the normalized identifier
# .join(" ") # Join the results together
Once you have chosen a way to create a list of what needs to be installed you can just pass that list to zef (although your shell may require you to quote names passed in explicitly on the command line)
rakubrew installs different Raku versions in different directories $HOME/.rakubrew/versions/moar-*
So each Raku version has its own separate Installation repositories ( site, vendor, ... ).
And because zef installs distributions to site repo by default, I think. So the modules are not available under multiple versions.
However, because Raku uses the home Installation repo (#inst/home/user-name/.raku) and it exists in repo-chain so you can install the modules you want available on all versions to home repo (~/.raku). ( the modules will be precompiled the first time useed in a new Raku version ).
Please note I haven't tested that with zef but I use Pakku which installs to home repo by default, and the modules I install to home are available to all rakubrew Raku versions on my Linux machine.
I just installed Windows Subsystem for Linux for the first time and downloaded the Debian distribution from the Windows Store.
The first thing I tried to do was use the "mv" command. The second thing was to run "man mv" because I don't remember how to use it. But I received the error:
-bash: man: command not found
It looks like the package I want is called manpages. But I can't install that:
sudo apt-get install manpages
[sudo] password for pi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package manpages is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'manpages' has no installation candidate
How do I get the man command up and running?
apt update to update the local package lists followed by apt install man-db to install the actual package.
I want to add to elken's answer that apparently, the 'man-db' packages doesn't cover all the manpages. For example, I needed documentation for the C stdio library (fopen, fgets, ...), and for that I had to install 'manpages-dev':
sudo apt install manpages-dev
Apparently there are also some other manpage collections (/different names for them on certain unix distros), see https://superuser.com/questions/40609/how-to-install-man-pages-for-c-standard-library-functions-in-ubuntu
I packaged an rpm using
make package
command, and copied the resulting rpm to another machine which has a company specific OS. Now when I try to install the rpm using
rpm --nodeps -i filename.rpm
I get the error the same as the one in the title.
So I ran
rpm -qa | grep rpm
on the machine used to build the rpm package, and got this:
rpm-4.8.0-37.el6.x86_64
rpm-devel-4.8.0-37.el6.x86_64
rpm-python-4.8.0-37.el6.x86_64
rpm-libs-4.8.0-37.el6.x86_64
rpm-build-4.8.0-37.el6.x86_64
redhat-rpm-config-9.0.3-51.el6.noarch
After a bit of investigation, I tried removing the redhat-rpm-config package and bam, rpm installation worked on the other machine. Now, this is a solution and all but I don't think I can just uninstall this package for every machine that we're going to use in creating the rpm. Is there any other way to ignore this redhat-rpm-config-9.0.3-51.el6.noarch when creating an rpm package using cmake?
What is the RPM version of the system you are installing on? Are its sources publicly available somewhere?
There could be various compatibility issues if you build binary RPMs using a newer RPM/distribution. In general, we build binary RPMs using the RPM and redhat-rpm-config versions in the buildroot (which is created by mock) itself, which matches the target RPM version, even if the build host has a newer RPM version.
If this is not an option for you, I would look at specific RPM features controlled by redhat-rpm-config. The one that sticks out to me immediately is payload compression:
# Use XZ compression for binary payloads
%_binary_payload w2.xzdio
Other changes include support for larger files, but this does not seem to be the issue here because it would not change by uninstalling the redhat-rpm-config package.
You very likely made binary RPM using rpmbuild on different OS than was the target OS. You should use "mock" for building the package.
dnf install mock
mock -r epel-6-x86_64 yourpackage.src.rpm
To solve "error: unpacking of archive failed: cpio: Bad magic" issue at RPM package installation on your machine:
1/ List rpm pkgs which are installed on the server machine (the machine on which the rpm pkg is generated):
$ rpm -qa | grep rpm
….
….
2/ If pkg redhat-rpm-config-9.0.3-51.el6.noarch is present in the given list, desinstall it:
$ rpm -e redhat-rpm-config-9.0.3-51.el6.noarch
3/ Generate now the pkg and tranfer it on your dev machine. Pkg installation should work.
Philippe.
I am using Mac for development. I installed Rust 1.13.0 using brew install rust and the Rust plugin 0.1.0.1385 for IntelliJ IDEA. I created my first test project with cargo and while opening it with IDEA I got the message
No standard library sources found, some code insight will not work
I haven't found any sources installed, nor the Rust sources package in Homebrew.
How do I provide sources for the project and what are the practical implication if I ignore this step?
As commented, the supported approach is to use rustup:
Navigate to https://rustup.rs/ and follow the installation instructions for your platform.
Add the rust-src component by running: rustup component add rust-src
Create a new Rust project in IntelliJ and choose your existing Rust project source. If the folder already contains previous IntelliJ project files, you may have to delete those first before it will let you proceed.
IntelliJ-Rust should automatically configure the standard library sources to point to the sources downloaded by rustup.
As a reference, since the question title is broad, for Fedora 28 I had to:
dnf install cargo rust-src
sudo ln -s /usr/lib/rustlib/src /usr/lib/rustlib/x86_64-unknown-linux-gnu/
then give /usr/lib/rustlib/x86_64-unknown-linux-gnu/src/rust/src as "Standard library"
Full setup:
Issue opened to simplify the process
When not using the rustup installer, one can install the source package and direct the rust plugin to use those:
(Tested with CLion 2020.2.1, rust-1.46.0-x86_64-pc-windows-gnu.msi, rustc-1.46.0-src.tar.gz. Offline Rust installers and source archive from there: https://forge.rust-lang.org/infra/other-installation-methods.html )
Although the preferred way of installing Rust is by using rustup, as pointed out by the other posts, it is not uncommon to use the packages that your distro makes available.
I use, for example, the packages provided by Gentoo and I share the same problem about the not prefilled field for standard libraries.
Nevertheless, you can easily find out where your standard libraries have been installed by typing the following find command:
find /usr/lib* -type d -name "rust" | grep src
or the following if you installed rust in your home
find -type d -name "rust" | grep src
The previous commands will help, unless, of course, in your distro there is a package for the binaries and one for the source and you only installed the binary one.
I know the question is for MacOS but this answer is shown up when searching for it on Linux. Below I will answer for Ubuntu.
The path is /usr/lib/rustlib/src/rust/src for Ubuntu 20.04
The way I did is:
Installed rustc from the repositories, which includes cargo
sudo apt install rustc
Then installed rust source package
sudo apt install rust-src
I used apt-file (can be installed with sudo apt install apt-file) to search for the install path of the sources
sudo apt-file update
apt-file list rust-src
This show the path as /usr/src/rustc-1.41.0/src .
But a ls -la in /usr/lib/rustlib/ will reveal symlinks and /usr/lib/rustlib/src/rust/src points to the previous found directory.
Using the symlink on IntelliJ will survive new rust versions.
For Fedora 32 install Rust using command:
dnf install cargo rust-src
and the path to standard libary source is:
/usr/lib/rustlib/src/rust
I used Ubuntu. I follow these steps:
sudo apt install rust-src
wait for the install, then
dpkg -L rust-src
copy the last line. For me it is the standard library path:
/usr/lib/rustlib/src/rust
For MacOS, you need to put /opt/homebrew/bin/.